Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
9550c031
Commit
9550c031
authored
Jan 18, 2019
by
乾坤平台
Committed by
季圣华
Jan 18, 2019
Browse files
!16 修复一系列问题
Merge pull request !16 from 乾坤平台/master
parents
fc03d050
c4623555
Changes
118
Show whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/datasource/entities/MaterialVo4Unit.java
View file @
9550c031
package
com.jsh.erp.datasource.entities
;
import
java.math.BigDecimal
;
public
class
MaterialVo4Unit
{
private
Long
id
;
...
...
@@ -10,9 +12,9 @@ public class MaterialVo4Unit {
private
String
mfrs
;
private
Double
packing
;
private
BigDecimal
packing
;
private
Double
safetystock
;
private
BigDecimal
safetystock
;
private
String
model
;
...
...
@@ -24,13 +26,13 @@ public class MaterialVo4Unit {
private
String
remark
;
private
Double
retailprice
;
private
BigDecimal
retailprice
;
private
Double
lowprice
;
private
BigDecimal
lowprice
;
private
Double
presetpriceone
;
private
BigDecimal
presetpriceone
;
private
Double
presetpricetwo
;
private
BigDecimal
presetpricetwo
;
private
Long
unitid
;
...
...
@@ -86,19 +88,19 @@ public class MaterialVo4Unit {
this
.
mfrs
=
mfrs
;
}
public
Double
getPacking
()
{
public
BigDecimal
getPacking
()
{
return
packing
;
}
public
void
setPacking
(
Double
packing
)
{
public
void
setPacking
(
BigDecimal
packing
)
{
this
.
packing
=
packing
;
}
public
Double
getSafetystock
()
{
public
BigDecimal
getSafetystock
()
{
return
safetystock
;
}
public
void
setSafetystock
(
Double
safetystock
)
{
public
void
setSafetystock
(
BigDecimal
safetystock
)
{
this
.
safetystock
=
safetystock
;
}
...
...
@@ -142,35 +144,35 @@ public class MaterialVo4Unit {
this
.
remark
=
remark
;
}
public
Double
getRetailprice
()
{
public
BigDecimal
getRetailprice
()
{
return
retailprice
;
}
public
void
setRetailprice
(
Double
retailprice
)
{
public
void
setRetailprice
(
BigDecimal
retailprice
)
{
this
.
retailprice
=
retailprice
;
}
public
Double
getLowprice
()
{
public
BigDecimal
getLowprice
()
{
return
lowprice
;
}
public
void
setLowprice
(
Double
lowprice
)
{
public
void
setLowprice
(
BigDecimal
lowprice
)
{
this
.
lowprice
=
lowprice
;
}
public
Double
getPresetpriceone
()
{
public
BigDecimal
getPresetpriceone
()
{
return
presetpriceone
;
}
public
void
setPresetpriceone
(
Double
presetpriceone
)
{
public
void
setPresetpriceone
(
BigDecimal
presetpriceone
)
{
this
.
presetpriceone
=
presetpriceone
;
}
public
Double
getPresetpricetwo
()
{
public
BigDecimal
getPresetpricetwo
()
{
return
presetpricetwo
;
}
public
void
setPresetpricetwo
(
Double
presetpricetwo
)
{
public
void
setPresetpricetwo
(
BigDecimal
presetpricetwo
)
{
this
.
presetpricetwo
=
presetpricetwo
;
}
...
...
src/main/java/com/jsh/erp/datasource/entities/Supplier.java
View file @
9550c031
package
com.jsh.erp.datasource.entities
;
import
java.math.BigDecimal
;
public
class
Supplier
{
/**
* This field was generated by MyBatis Generator.
...
...
@@ -79,7 +81,7 @@ public class Supplier {
*
* @mbggenerated
*/
private
Double
advancein
;
private
BigDecimal
advancein
;
/**
* This field was generated by MyBatis Generator.
...
...
@@ -87,7 +89,7 @@ public class Supplier {
*
* @mbggenerated
*/
private
Double
beginneedget
;
private
BigDecimal
beginneedget
;
/**
* This field was generated by MyBatis Generator.
...
...
@@ -95,7 +97,7 @@ public class Supplier {
*
* @mbggenerated
*/
private
Double
beginneedpay
;
private
BigDecimal
beginneedpay
;
/**
* This field was generated by MyBatis Generator.
...
...
@@ -103,7 +105,7 @@ public class Supplier {
*
* @mbggenerated
*/
private
Double
allneedget
;
private
BigDecimal
allneedget
;
/**
* This field was generated by MyBatis Generator.
...
...
@@ -111,7 +113,7 @@ public class Supplier {
*
* @mbggenerated
*/
private
Double
allneedpay
;
private
BigDecimal
allneedpay
;
/**
* This field was generated by MyBatis Generator.
...
...
@@ -167,7 +169,7 @@ public class Supplier {
*
* @mbggenerated
*/
private
Double
taxrate
;
private
BigDecimal
taxrate
;
/**
* This method was generated by MyBatis Generator.
...
...
@@ -393,7 +395,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
Double
getAdvancein
()
{
public
BigDecimal
getAdvancein
()
{
return
advancein
;
}
...
...
@@ -405,7 +407,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
void
setAdvancein
(
Double
advancein
)
{
public
void
setAdvancein
(
BigDecimal
advancein
)
{
this
.
advancein
=
advancein
;
}
...
...
@@ -417,7 +419,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
Double
getBeginneedget
()
{
public
BigDecimal
getBeginneedget
()
{
return
beginneedget
;
}
...
...
@@ -429,7 +431,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
void
setBeginneedget
(
Double
beginneedget
)
{
public
void
setBeginneedget
(
BigDecimal
beginneedget
)
{
this
.
beginneedget
=
beginneedget
;
}
...
...
@@ -441,7 +443,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
Double
getBeginneedpay
()
{
public
BigDecimal
getBeginneedpay
()
{
return
beginneedpay
;
}
...
...
@@ -453,7 +455,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
void
setBeginneedpay
(
Double
beginneedpay
)
{
public
void
setBeginneedpay
(
BigDecimal
beginneedpay
)
{
this
.
beginneedpay
=
beginneedpay
;
}
...
...
@@ -465,7 +467,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
Double
getAllneedget
()
{
public
BigDecimal
getAllneedget
()
{
return
allneedget
;
}
...
...
@@ -477,7 +479,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
void
setAllneedget
(
Double
allneedget
)
{
public
void
setAllneedget
(
BigDecimal
allneedget
)
{
this
.
allneedget
=
allneedget
;
}
...
...
@@ -489,7 +491,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
Double
getAllneedpay
()
{
public
BigDecimal
getAllneedpay
()
{
return
allneedpay
;
}
...
...
@@ -501,7 +503,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
void
setAllneedpay
(
Double
allneedpay
)
{
public
void
setAllneedpay
(
BigDecimal
allneedpay
)
{
this
.
allneedpay
=
allneedpay
;
}
...
...
@@ -657,7 +659,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
Double
getTaxrate
()
{
public
BigDecimal
getTaxrate
()
{
return
taxrate
;
}
...
...
@@ -669,7 +671,7 @@ public class Supplier {
*
* @mbggenerated
*/
public
void
setTaxrate
(
Double
taxrate
)
{
public
void
setTaxrate
(
BigDecimal
taxrate
)
{
this
.
taxrate
=
taxrate
;
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/entities/SupplierExample.java
View file @
9550c031
package
com.jsh.erp.datasource.entities
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -804,52 +805,52 @@ public class SupplierExample {
return
(
Criteria
)
this
;
}
public
Criteria
andAdvanceinEqualTo
(
Double
value
)
{
public
Criteria
andAdvanceinEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AdvanceIn ="
,
value
,
"advancein"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAdvanceinNotEqualTo
(
Double
value
)
{
public
Criteria
andAdvanceinNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AdvanceIn <>"
,
value
,
"advancein"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAdvanceinGreaterThan
(
Double
value
)
{
public
Criteria
andAdvanceinGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"AdvanceIn >"
,
value
,
"advancein"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAdvanceinGreaterThanOrEqualTo
(
Double
value
)
{
public
Criteria
andAdvanceinGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AdvanceIn >="
,
value
,
"advancein"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAdvanceinLessThan
(
Double
value
)
{
public
Criteria
andAdvanceinLessThan
(
BigDecimal
value
)
{
addCriterion
(
"AdvanceIn <"
,
value
,
"advancein"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAdvanceinLessThanOrEqualTo
(
Double
value
)
{
public
Criteria
andAdvanceinLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AdvanceIn <="
,
value
,
"advancein"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAdvanceinIn
(
List
<
Double
>
values
)
{
public
Criteria
andAdvanceinIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"AdvanceIn in"
,
values
,
"advancein"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAdvanceinNotIn
(
List
<
Double
>
values
)
{
public
Criteria
andAdvanceinNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"AdvanceIn not in"
,
values
,
"advancein"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAdvanceinBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andAdvanceinBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"AdvanceIn between"
,
value1
,
value2
,
"advancein"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAdvanceinNotBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andAdvanceinNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"AdvanceIn not between"
,
value1
,
value2
,
"advancein"
);
return
(
Criteria
)
this
;
}
...
...
@@ -864,52 +865,52 @@ public class SupplierExample {
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedgetEqualTo
(
Double
value
)
{
public
Criteria
andBeginneedgetEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedGet ="
,
value
,
"beginneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedgetNotEqualTo
(
Double
value
)
{
public
Criteria
andBeginneedgetNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedGet <>"
,
value
,
"beginneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedgetGreaterThan
(
Double
value
)
{
public
Criteria
andBeginneedgetGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedGet >"
,
value
,
"beginneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedgetGreaterThanOrEqualTo
(
Double
value
)
{
public
Criteria
andBeginneedgetGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedGet >="
,
value
,
"beginneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedgetLessThan
(
Double
value
)
{
public
Criteria
andBeginneedgetLessThan
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedGet <"
,
value
,
"beginneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedgetLessThanOrEqualTo
(
Double
value
)
{
public
Criteria
andBeginneedgetLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedGet <="
,
value
,
"beginneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedgetIn
(
List
<
Double
>
values
)
{
public
Criteria
andBeginneedgetIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"BeginNeedGet in"
,
values
,
"beginneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedgetNotIn
(
List
<
Double
>
values
)
{
public
Criteria
andBeginneedgetNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"BeginNeedGet not in"
,
values
,
"beginneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedgetBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andBeginneedgetBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"BeginNeedGet between"
,
value1
,
value2
,
"beginneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedgetNotBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andBeginneedgetNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"BeginNeedGet not between"
,
value1
,
value2
,
"beginneedget"
);
return
(
Criteria
)
this
;
}
...
...
@@ -924,52 +925,52 @@ public class SupplierExample {
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedpayEqualTo
(
Double
value
)
{
public
Criteria
andBeginneedpayEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedPay ="
,
value
,
"beginneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedpayNotEqualTo
(
Double
value
)
{
public
Criteria
andBeginneedpayNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedPay <>"
,
value
,
"beginneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedpayGreaterThan
(
Double
value
)
{
public
Criteria
andBeginneedpayGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedPay >"
,
value
,
"beginneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedpayGreaterThanOrEqualTo
(
Double
value
)
{
public
Criteria
andBeginneedpayGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedPay >="
,
value
,
"beginneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedpayLessThan
(
Double
value
)
{
public
Criteria
andBeginneedpayLessThan
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedPay <"
,
value
,
"beginneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedpayLessThanOrEqualTo
(
Double
value
)
{
public
Criteria
andBeginneedpayLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"BeginNeedPay <="
,
value
,
"beginneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedpayIn
(
List
<
Double
>
values
)
{
public
Criteria
andBeginneedpayIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"BeginNeedPay in"
,
values
,
"beginneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedpayNotIn
(
List
<
Double
>
values
)
{
public
Criteria
andBeginneedpayNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"BeginNeedPay not in"
,
values
,
"beginneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedpayBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andBeginneedpayBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"BeginNeedPay between"
,
value1
,
value2
,
"beginneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBeginneedpayNotBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andBeginneedpayNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"BeginNeedPay not between"
,
value1
,
value2
,
"beginneedpay"
);
return
(
Criteria
)
this
;
}
...
...
@@ -984,52 +985,52 @@ public class SupplierExample {
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedgetEqualTo
(
Double
value
)
{
public
Criteria
andAllneedgetEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedGet ="
,
value
,
"allneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedgetNotEqualTo
(
Double
value
)
{
public
Criteria
andAllneedgetNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedGet <>"
,
value
,
"allneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedgetGreaterThan
(
Double
value
)
{
public
Criteria
andAllneedgetGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedGet >"
,
value
,
"allneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedgetGreaterThanOrEqualTo
(
Double
value
)
{
public
Criteria
andAllneedgetGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedGet >="
,
value
,
"allneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedgetLessThan
(
Double
value
)
{
public
Criteria
andAllneedgetLessThan
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedGet <"
,
value
,
"allneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedgetLessThanOrEqualTo
(
Double
value
)
{
public
Criteria
andAllneedgetLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedGet <="
,
value
,
"allneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedgetIn
(
List
<
Double
>
values
)
{
public
Criteria
andAllneedgetIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"AllNeedGet in"
,
values
,
"allneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedgetNotIn
(
List
<
Double
>
values
)
{
public
Criteria
andAllneedgetNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"AllNeedGet not in"
,
values
,
"allneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedgetBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andAllneedgetBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"AllNeedGet between"
,
value1
,
value2
,
"allneedget"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedgetNotBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andAllneedgetNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"AllNeedGet not between"
,
value1
,
value2
,
"allneedget"
);
return
(
Criteria
)
this
;
}
...
...
@@ -1044,52 +1045,52 @@ public class SupplierExample {
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedpayEqualTo
(
Double
value
)
{
public
Criteria
andAllneedpayEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedPay ="
,
value
,
"allneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedpayNotEqualTo
(
Double
value
)
{
public
Criteria
andAllneedpayNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedPay <>"
,
value
,
"allneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedpayGreaterThan
(
Double
value
)
{
public
Criteria
andAllneedpayGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedPay >"
,
value
,
"allneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedpayGreaterThanOrEqualTo
(
Double
value
)
{
public
Criteria
andAllneedpayGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedPay >="
,
value
,
"allneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedpayLessThan
(
Double
value
)
{
public
Criteria
andAllneedpayLessThan
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedPay <"
,
value
,
"allneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedpayLessThanOrEqualTo
(
Double
value
)
{
public
Criteria
andAllneedpayLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"AllNeedPay <="
,
value
,
"allneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedpayIn
(
List
<
Double
>
values
)
{
public
Criteria
andAllneedpayIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"AllNeedPay in"
,
values
,
"allneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedpayNotIn
(
List
<
Double
>
values
)
{
public
Criteria
andAllneedpayNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"AllNeedPay not in"
,
values
,
"allneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedpayBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andAllneedpayBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"AllNeedPay between"
,
value1
,
value2
,
"allneedpay"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAllneedpayNotBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andAllneedpayNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"AllNeedPay not between"
,
value1
,
value2
,
"allneedpay"
);
return
(
Criteria
)
this
;
}
...
...
@@ -1524,52 +1525,52 @@ public class SupplierExample {
return
(
Criteria
)
this
;
}
public
Criteria
andTaxrateEqualTo
(
Double
value
)
{
public
Criteria
andTaxrateEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"taxRate ="
,
value
,
"taxrate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTaxrateNotEqualTo
(
Double
value
)
{
public
Criteria
andTaxrateNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"taxRate <>"
,
value
,
"taxrate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTaxrateGreaterThan
(
Double
value
)
{
public
Criteria
andTaxrateGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"taxRate >"
,
value
,
"taxrate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTaxrateGreaterThanOrEqualTo
(
Double
value
)
{
public
Criteria
andTaxrateGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"taxRate >="
,
value
,
"taxrate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTaxrateLessThan
(
Double
value
)
{
public
Criteria
andTaxrateLessThan
(
BigDecimal
value
)
{
addCriterion
(
"taxRate <"
,
value
,
"taxrate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTaxrateLessThanOrEqualTo
(
Double
value
)
{
public
Criteria
andTaxrateLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"taxRate <="
,
value
,
"taxrate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTaxrateIn
(
List
<
Double
>
values
)
{
public
Criteria
andTaxrateIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"taxRate in"
,
values
,
"taxrate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTaxrateNotIn
(
List
<
Double
>
values
)
{
public
Criteria
andTaxrateNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"taxRate not in"
,
values
,
"taxrate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTaxrateBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andTaxrateBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"taxRate between"
,
value1
,
value2
,
"taxrate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTaxrateNotBetween
(
Double
value1
,
Double
value2
)
{
public
Criteria
andTaxrateNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"taxRate not between"
,
value1
,
value2
,
"taxrate"
);
return
(
Criteria
)
this
;
}
...
...
src/main/java/com/jsh/erp/datasource/mappers/AccountHeadMapper.java
View file @
9550c031
...
...
@@ -2,6 +2,8 @@ package com.jsh.erp.datasource.mappers;
import
com.jsh.erp.datasource.entities.AccountHead
;
import
com.jsh.erp.datasource.entities.AccountHeadExample
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
com.jsh.erp.datasource.entities.AccountHeadVo4ListEx
;
...
...
@@ -112,7 +114,7 @@ public interface AccountHeadMapper {
Long
getMaxId
();
Double
findAllMoney
(
BigDecimal
findAllMoney
(
@Param
(
"supplierId"
)
Integer
supplierId
,
@Param
(
"type"
)
String
type
,
@Param
(
"modeName"
)
String
modeName
,
...
...
src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapper.java
View file @
9550c031
...
...
@@ -2,6 +2,8 @@ package com.jsh.erp.datasource.mappers;
import
com.jsh.erp.datasource.entities.DepotHead
;
import
com.jsh.erp.datasource.entities.DepotHeadExample
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
com.jsh.erp.datasource.vo.DepotHeadVo4InDetail
;
...
...
@@ -172,7 +174,7 @@ public interface DepotHeadMapper {
@Param
(
"organId"
)
Integer
organId
,
@Param
(
"supType"
)
String
supType
);
Double
findAllMoney
(
BigDecimal
findAllMoney
(
@Param
(
"supplierId"
)
Integer
supplierId
,
@Param
(
"type"
)
String
type
,
@Param
(
"subType"
)
String
subType
,
...
...
src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapper.java
View file @
9550c031
...
...
@@ -2,6 +2,7 @@ package com.jsh.erp.datasource.mappers;
import
com.jsh.erp.datasource.entities.*
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -148,68 +149,68 @@ public interface DepotItemMapper {
@Param
(
"headIds"
)
String
headIds
,
@Param
(
"materialIds"
)
String
materialIds
);
Double
findByTypeInIsPrev
(
BigDecimal
findByTypeInIsPrev
(
@Param
(
"ProjectId"
)
Integer
ProjectId
,
@Param
(
"MId"
)
Long
MId
,
@Param
(
"MonthTime"
)
String
MonthTime
);
Double
findByTypeInIsNotPrev
(
BigDecimal
findByTypeInIsNotPrev
(
@Param
(
"ProjectId"
)
Integer
ProjectId
,
@Param
(
"MId"
)
Long
MId
,
@Param
(
"MonthTime"
)
String
MonthTime
);
Double
findByTypeOutIsPrev
(
BigDecimal
findByTypeOutIsPrev
(
@Param
(
"ProjectId"
)
Integer
ProjectId
,
@Param
(
"MId"
)
Long
MId
,
@Param
(
"MonthTime"
)
String
MonthTime
);
Double
findByTypeOutIsNotPrev
(
BigDecimal
findByTypeOutIsNotPrev
(
@Param
(
"ProjectId"
)
Integer
ProjectId
,
@Param
(
"MId"
)
Long
MId
,
@Param
(
"MonthTime"
)
String
MonthTime
);
Double
findPriceByTypeInIsPrev
(
BigDecimal
findPriceByTypeInIsPrev
(
@Param
(
"ProjectId"
)
Integer
ProjectId
,
@Param
(
"MId"
)
Long
MId
,
@Param
(
"MonthTime"
)
String
MonthTime
);
Double
findPriceByTypeInIsNotPrev
(
BigDecimal
findPriceByTypeInIsNotPrev
(
@Param
(
"ProjectId"
)
Integer
ProjectId
,
@Param
(
"MId"
)
Long
MId
,
@Param
(
"MonthTime"
)
String
MonthTime
);
Double
findPriceByTypeOutIsPrev
(
BigDecimal
findPriceByTypeOutIsPrev
(
@Param
(
"ProjectId"
)
Integer
ProjectId
,
@Param
(
"MId"
)
Long
MId
,
@Param
(
"MonthTime"
)
String
MonthTime
);
Double
findPriceByTypeOutIsNotPrev
(
BigDecimal
findPriceByTypeOutIsNotPrev
(
@Param
(
"ProjectId"
)
Integer
ProjectId
,
@Param
(
"MId"
)
Long
MId
,
@Param
(
"MonthTime"
)
String
MonthTime
);
Double
buyOrSaleNumber
(
BigDecimal
buyOrSaleNumber
(
@Param
(
"type"
)
String
type
,
@Param
(
"subType"
)
String
subType
,
@Param
(
"MId"
)
Long
MId
,
@Param
(
"MonthTime"
)
String
MonthTime
,
@Param
(
"sumType"
)
String
sumType
);
Double
buyOrSalePrice
(
BigDecimal
buyOrSalePrice
(
@Param
(
"type"
)
String
type
,
@Param
(
"subType"
)
String
subType
,
@Param
(
"MId"
)
Long
MId
,
@Param
(
"MonthTime"
)
String
MonthTime
,
@Param
(
"sumType"
)
String
sumType
);
Double
findGiftByTypeIn
(
BigDecimal
findGiftByTypeIn
(
@Param
(
"subType"
)
String
subType
,
@Param
(
"ProjectId"
)
Integer
ProjectId
,
@Param
(
"MId"
)
Long
MId
);
Double
findGiftByTypeOut
(
BigDecimal
findGiftByTypeOut
(
@Param
(
"subType"
)
String
subType
,
@Param
(
"ProjectId"
)
Integer
ProjectId
,
@Param
(
"MId"
)
Long
MId
);
...
...
src/main/java/com/jsh/erp/datasource/mappers/MaterialMapper.java
View file @
9550c031
src/main/java/com/jsh/erp/datasource/mappers/SupplierMapper.java
View file @
9550c031
src/main/java/com/jsh/erp/datasource/vo/AccountItemVo4List.java
View file @
9550c031
package
com.jsh.erp.datasource.vo
;
import
java.math.BigDecimal
;
public
class
AccountItemVo4List
{
private
Long
id
;
...
...
@@ -10,7 +12,7 @@ public class AccountItemVo4List {
private
Long
inoutitemid
;
private
Double
eachamount
;
private
BigDecimal
eachamount
;
private
String
remark
;
...
...
@@ -50,11 +52,11 @@ public class AccountItemVo4List {
this
.
inoutitemid
=
inoutitemid
;
}
public
Double
getEachamount
()
{
public
BigDecimal
getEachamount
()
{
return
eachamount
;
}
public
void
setEachamount
(
Double
eachamount
)
{
public
void
setEachamount
(
BigDecimal
eachamount
)
{
this
.
eachamount
=
eachamount
;
}
...
...
src/main/java/com/jsh/erp/datasource/vo/AccountVo4InOutList.java
View file @
9550c031
package
com.jsh.erp.datasource.vo
;
import
java.math.BigDecimal
;
public
class
AccountVo4InOutList
{
private
String
number
;
...
...
@@ -8,9 +10,9 @@ public class AccountVo4InOutList {
private
String
supplierName
;
private
Double
changeAmount
;
private
BigDecimal
changeAmount
;
private
Double
balance
;
private
BigDecimal
balance
;
private
String
operTime
;
...
...
@@ -42,19 +44,19 @@ public class AccountVo4InOutList {
this
.
supplierName
=
supplierName
;
}
public
Double
getChangeAmount
()
{
public
BigDecimal
getChangeAmount
()
{
return
changeAmount
;
}
public
void
setChangeAmount
(
Double
changeAmount
)
{
public
void
setChangeAmount
(
BigDecimal
changeAmount
)
{
this
.
changeAmount
=
changeAmount
;
}
public
Double
getBalance
()
{
public
BigDecimal
getBalance
()
{
return
balance
;
}
public
void
setBalance
(
Double
balance
)
{
public
void
setBalance
(
BigDecimal
balance
)
{
this
.
balance
=
balance
;
}
...
...
src/main/java/com/jsh/erp/datasource/vo/AccountVo4List.java
View file @
9550c031
package
com.jsh.erp.datasource.vo
;
import
java.math.BigDecimal
;
public
class
AccountVo4List
{
private
Long
id
;
...
...
@@ -8,9 +10,9 @@ public class AccountVo4List {
private
String
serialno
;
private
Double
initialamount
;
private
BigDecimal
initialamount
;
private
Double
currentamount
;
private
BigDecimal
currentamount
;
private
String
remark
;
...
...
@@ -42,19 +44,19 @@ public class AccountVo4List {
this
.
serialno
=
serialno
;
}
public
Double
getInitialamount
()
{
public
BigDecimal
getInitialamount
()
{
return
initialamount
;
}
public
void
setInitialamount
(
Double
initialamount
)
{
public
void
setInitialamount
(
BigDecimal
initialamount
)
{
this
.
initialamount
=
initialamount
;
}
public
Double
getCurrentamount
()
{
public
BigDecimal
getCurrentamount
()
{
return
currentamount
;
}
public
void
setCurrentamount
(
Double
currentamount
)
{
public
void
setCurrentamount
(
BigDecimal
currentamount
)
{
this
.
currentamount
=
currentamount
;
}
...
...
src/main/java/com/jsh/erp/datasource/vo/DepotHeadVo4InDetail.java
View file @
9550c031
package
com.jsh.erp.datasource.vo
;
import
java.math.BigDecimal
;
import
java.util.Date
;
public
class
DepotHeadVo4InDetail
{
...
...
@@ -11,11 +12,11 @@ public class DepotHeadVo4InDetail {
private
String
Model
;
private
Double
UnitPrice
;
private
BigDecimal
UnitPrice
;
private
Double
OperNumber
;
private
BigDecimal
OperNumber
;
private
Double
AllPrice
;
private
BigDecimal
AllPrice
;
private
String
SName
;
...
...
@@ -49,27 +50,27 @@ public class DepotHeadVo4InDetail {
Model
=
model
;
}
public
Double
getUnitPrice
()
{
public
BigDecimal
getUnitPrice
()
{
return
UnitPrice
;
}
public
void
setUnitPrice
(
Double
unitPrice
)
{
public
void
setUnitPrice
(
BigDecimal
unitPrice
)
{
UnitPrice
=
unitPrice
;
}
public
Double
getOperNumber
()
{
public
BigDecimal
getOperNumber
()
{
return
OperNumber
;
}
public
void
setOperNumber
(
Double
operNumber
)
{
public
void
setOperNumber
(
BigDecimal
operNumber
)
{
OperNumber
=
operNumber
;
}
public
Double
getAllPrice
()
{
public
BigDecimal
getAllPrice
()
{
return
AllPrice
;
}
public
void
setAllPrice
(
Double
allPrice
)
{
public
void
setAllPrice
(
BigDecimal
allPrice
)
{
AllPrice
=
allPrice
;
}
...
...
src/main/java/com/jsh/erp/datasource/vo/DepotHeadVo4InOutMCount.java
View file @
9550c031
package
com.jsh.erp.datasource.vo
;
import
java.math.BigDecimal
;
public
class
DepotHeadVo4InOutMCount
{
private
Long
MaterialId
;
...
...
@@ -11,9 +13,9 @@ public class DepotHeadVo4InOutMCount {
private
String
categoryName
;
private
Double
numSum
;
private
BigDecimal
numSum
;
private
Double
priceSum
;
private
BigDecimal
priceSum
;
public
Long
getMaterialId
()
{
return
MaterialId
;
...
...
@@ -47,19 +49,19 @@ public class DepotHeadVo4InOutMCount {
this
.
categoryName
=
categoryName
;
}
public
Double
getNumSum
()
{
public
BigDecimal
getNumSum
()
{
return
numSum
;
}
public
void
setNumSum
(
Double
numSum
)
{
public
void
setNumSum
(
BigDecimal
numSum
)
{
this
.
numSum
=
numSum
;
}
public
Double
getPriceSum
()
{
public
BigDecimal
getPriceSum
()
{
return
priceSum
;
}
public
void
setPriceSum
(
Double
priceSum
)
{
public
void
setPriceSum
(
BigDecimal
priceSum
)
{
this
.
priceSum
=
priceSum
;
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/vo/DepotHeadVo4List.java
View file @
9550c031
package
com.jsh.erp.datasource.vo
;
import
java.math.BigDecimal
;
import
java.util.Date
;
public
class
DepotHeadVo4List
{
...
...
@@ -28,11 +29,11 @@ public class DepotHeadVo4List {
private
Long
accountid
;
private
Double
changeamount
;
private
BigDecimal
changeamount
;
private
Long
allocationprojectid
;
private
Double
totalprice
;
private
BigDecimal
totalprice
;
private
String
paytype
;
...
...
@@ -44,13 +45,13 @@ public class DepotHeadVo4List {
private
String
accountmoneylist
;
private
Double
discount
;
private
BigDecimal
discount
;
private
Double
discountmoney
;
private
BigDecimal
discountmoney
;
private
Double
discountlastmoney
;
private
BigDecimal
discountlastmoney
;
private
Double
othermoney
;
private
BigDecimal
othermoney
;
private
String
othermoneylist
;
...
...
@@ -168,11 +169,11 @@ public class DepotHeadVo4List {
this
.
accountid
=
accountid
;
}
public
Double
getChangeamount
()
{
public
BigDecimal
getChangeamount
()
{
return
changeamount
;
}
public
void
setChangeamount
(
Double
changeamount
)
{
public
void
setChangeamount
(
BigDecimal
changeamount
)
{
this
.
changeamount
=
changeamount
;
}
...
...
@@ -184,11 +185,11 @@ public class DepotHeadVo4List {
this
.
allocationprojectid
=
allocationprojectid
;
}
public
Double
getTotalprice
()
{
public
BigDecimal
getTotalprice
()
{
return
totalprice
;
}
public
void
setTotalprice
(
Double
totalprice
)
{
public
void
setTotalprice
(
BigDecimal
totalprice
)
{
this
.
totalprice
=
totalprice
;
}
...
...
@@ -232,35 +233,35 @@ public class DepotHeadVo4List {
this
.
accountmoneylist
=
accountmoneylist
;
}
public
Double
getDiscount
()
{
public
BigDecimal
getDiscount
()
{
return
discount
;
}
public
void
setDiscount
(
Double
discount
)
{
public
void
setDiscount
(
BigDecimal
discount
)
{
this
.
discount
=
discount
;
}
public
Double
getDiscountmoney
()
{
public
BigDecimal
getDiscountmoney
()
{
return
discountmoney
;
}
public
void
setDiscountmoney
(
Double
discountmoney
)
{
public
void
setDiscountmoney
(
BigDecimal
discountmoney
)
{
this
.
discountmoney
=
discountmoney
;
}
public
Double
getDiscountlastmoney
()
{
public
BigDecimal
getDiscountlastmoney
()
{
return
discountlastmoney
;
}
public
void
setDiscountlastmoney
(
Double
discountlastmoney
)
{
public
void
setDiscountlastmoney
(
BigDecimal
discountlastmoney
)
{
this
.
discountlastmoney
=
discountlastmoney
;
}
public
Double
getOthermoney
()
{
public
BigDecimal
getOthermoney
()
{
return
othermoney
;
}
public
void
setOthermoney
(
Double
othermoney
)
{
public
void
setOthermoney
(
BigDecimal
othermoney
)
{
this
.
othermoney
=
othermoney
;
}
...
...
src/main/java/com/jsh/erp/datasource/vo/DepotHeadVo4StatementAccount.java
View file @
9550c031
package
com.jsh.erp.datasource.vo
;
import
java.math.BigDecimal
;
public
class
DepotHeadVo4StatementAccount
{
private
String
number
;
private
String
type
;
private
Double
discountLastMoney
;
private
BigDecimal
discountLastMoney
;
private
Double
changeAmount
;
private
BigDecimal
changeAmount
;
private
Double
allPrice
;
private
BigDecimal
allPrice
;
private
String
supplierName
;
...
...
@@ -33,27 +35,27 @@ public class DepotHeadVo4StatementAccount {
this
.
type
=
type
;
}
public
Double
getDiscountLastMoney
()
{
public
BigDecimal
getDiscountLastMoney
()
{
return
discountLastMoney
;
}
public
void
setDiscountLastMoney
(
Double
discountLastMoney
)
{
public
void
setDiscountLastMoney
(
BigDecimal
discountLastMoney
)
{
this
.
discountLastMoney
=
discountLastMoney
;
}
public
Double
getChangeAmount
()
{
public
BigDecimal
getChangeAmount
()
{
return
changeAmount
;
}
public
void
setChangeAmount
(
Double
changeAmount
)
{
public
void
setChangeAmount
(
BigDecimal
changeAmount
)
{
this
.
changeAmount
=
changeAmount
;
}
public
Double
getAllPrice
()
{
public
BigDecimal
getAllPrice
()
{
return
allPrice
;
}
public
void
setAllPrice
(
Double
allPrice
)
{
public
void
setAllPrice
(
BigDecimal
allPrice
)
{
this
.
allPrice
=
allPrice
;
}
...
...
src/main/java/com/jsh/erp/service/CommonQueryManager.java
View file @
9550c031
...
...
@@ -2,6 +2,7 @@ package com.jsh.erp.service;
import
com.jsh.erp.utils.StringUtil
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -63,6 +64,7 @@ public class CommonQueryManager {
* @param beanJson
* @return
*/
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
insert
(
String
apiName
,
String
beanJson
,
HttpServletRequest
request
)
{
if
(
StringUtil
.
isNotEmpty
(
apiName
))
{
return
container
.
getCommonQuery
(
apiName
).
insert
(
beanJson
,
request
);
...
...
@@ -77,6 +79,7 @@ public class CommonQueryManager {
* @param id
* @return
*/
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
update
(
String
apiName
,
String
beanJson
,
Long
id
)
{
if
(
StringUtil
.
isNotEmpty
(
apiName
))
{
return
container
.
getCommonQuery
(
apiName
).
update
(
beanJson
,
id
);
...
...
@@ -90,6 +93,7 @@ public class CommonQueryManager {
* @param id
* @return
*/
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
delete
(
String
apiName
,
Long
id
)
{
if
(
StringUtil
.
isNotEmpty
(
apiName
))
{
return
container
.
getCommonQuery
(
apiName
).
delete
(
id
);
...
...
@@ -103,6 +107,7 @@ public class CommonQueryManager {
* @param ids
* @return
*/
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
batchDelete
(
String
apiName
,
String
ids
)
{
if
(
StringUtil
.
isNotEmpty
(
apiName
))
{
return
container
.
getCommonQuery
(
apiName
).
batchDelete
(
ids
);
...
...
src/main/java/com/jsh/erp/service/account/AccountService.java
View file @
9550c031
package
com.jsh.erp.service.account
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jsh.erp.datasource.entities.*
;
import
com.jsh.erp.datasource.mappers.AccountHeadMapper
;
...
...
@@ -15,9 +14,11 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -55,13 +56,13 @@ public class AccountService {
if
(
null
!=
list
&&
null
!=
timeStr
)
{
for
(
AccountVo4List
al
:
list
)
{
DecimalFormat
df
=
new
DecimalFormat
(
".##"
);
Double
thisMonthAmount
=
getAccountSum
(
al
.
getId
(),
timeStr
,
"month"
)
+
getAccountSumByHead
(
al
.
getId
(),
timeStr
,
"month"
)
+
getAccountSumByDetail
(
al
.
getId
(),
timeStr
,
"month"
)
+
getManyAccountSum
(
al
.
getId
(),
timeStr
,
"month"
);
BigDecimal
thisMonthAmount
=
getAccountSum
(
al
.
getId
(),
timeStr
,
"month"
)
.
add
(
getAccountSumByHead
(
al
.
getId
(),
timeStr
,
"month"
)
).
add
(
getAccountSumByDetail
(
al
.
getId
(),
timeStr
,
"month"
)
).
add
(
getManyAccountSum
(
al
.
getId
(),
timeStr
,
"month"
)
)
;
String
thisMonthAmountFmt
=
"0"
;
if
(
thisMonthAmount
!=
0
)
{
if
(
(
thisMonthAmount
.
compareTo
(
BigDecimal
.
ZERO
))
!=
0
)
{
thisMonthAmountFmt
=
df
.
format
(
thisMonthAmount
);
}
al
.
setThismonthamount
(
thisMonthAmountFmt
);
//本月发生额
Double
currentAmount
=
getAccountSum
(
al
.
getId
(),
""
,
"month"
)
+
getAccountSumByHead
(
al
.
getId
(),
""
,
"month"
)
+
getAccountSumByDetail
(
al
.
getId
(),
""
,
"month"
)
+
getManyAccountSum
(
al
.
getId
(),
""
,
"month"
)
+
al
.
getInitialamount
();
BigDecimal
currentAmount
=
getAccountSum
(
al
.
getId
(),
""
,
"month"
)
.
add
(
getAccountSumByHead
(
al
.
getId
(),
""
,
"month"
)
).
add
(
getAccountSumByDetail
(
al
.
getId
(),
""
,
"month"
)
).
add
(
getManyAccountSum
(
al
.
getId
(),
""
,
"month"
)
)
.
add
(
al
.
getInitialamount
()
)
;
al
.
setCurrentamount
(
currentAmount
);
resList
.
add
(
al
);
}
...
...
@@ -73,25 +74,29 @@ public class AccountService {
return
accountMapper
.
countsByAccount
(
name
,
serialNo
,
remark
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
insertAccount
(
String
beanJson
,
HttpServletRequest
request
)
{
Account
account
=
JSONObject
.
parseObject
(
beanJson
,
Account
.
class
);
if
(
account
.
getInitialamount
()
==
null
)
{
account
.
setInitialamount
(
0
d
);
account
.
setInitialamount
(
BigDecimal
.
ZERO
);
}
account
.
setIsdefault
(
false
);
return
accountMapper
.
insertSelective
(
account
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateAccount
(
String
beanJson
,
Long
id
)
{
Account
account
=
JSONObject
.
parseObject
(
beanJson
,
Account
.
class
);
account
.
setId
(
id
);
return
accountMapper
.
updateByPrimaryKeySelective
(
account
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
deleteAccount
(
Long
id
)
{
return
accountMapper
.
deleteByPrimaryKey
(
id
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
batchDeleteAccount
(
String
ids
)
{
List
<
Long
>
idList
=
StringUtil
.
strToLongList
(
ids
);
AccountExample
example
=
new
AccountExample
();
...
...
@@ -118,8 +123,8 @@ public class AccountService {
* @param id
* @return
*/
public
Double
getAccountSum
(
Long
id
,
String
timeStr
,
String
type
)
{
Double
accountSum
=
0.0
;
public
BigDecimal
getAccountSum
(
Long
id
,
String
timeStr
,
String
type
)
{
BigDecimal
accountSum
=
BigDecimal
.
ZERO
;
try
{
DepotHeadExample
example
=
new
DepotHeadExample
();
if
(!
timeStr
.
equals
(
""
))
{
...
...
@@ -140,7 +145,7 @@ public class AccountService {
if
(
dataList
!=
null
)
{
for
(
DepotHead
depotHead
:
dataList
)
{
if
(
depotHead
.
getChangeamount
()!=
null
)
{
accountSum
=
accountSum
+
depotHead
.
getChangeamount
();
accountSum
=
accountSum
.
add
(
depotHead
.
getChangeamount
()
)
;
}
}
}
...
...
@@ -156,8 +161,8 @@ public class AccountService {
* @param id
* @return
*/
public
Double
getAccountSumByHead
(
Long
id
,
String
timeStr
,
String
type
)
{
Double
accountSum
=
0.0
;
public
BigDecimal
getAccountSumByHead
(
Long
id
,
String
timeStr
,
String
type
)
{
BigDecimal
accountSum
=
BigDecimal
.
ZERO
;
try
{
AccountHeadExample
example
=
new
AccountHeadExample
();
if
(!
timeStr
.
equals
(
""
))
{
...
...
@@ -178,7 +183,7 @@ public class AccountService {
if
(
dataList
!=
null
)
{
for
(
AccountHead
accountHead
:
dataList
)
{
if
(
accountHead
.
getChangeamount
()!=
null
)
{
accountSum
=
accountSum
+
accountHead
.
getChangeamount
();
accountSum
=
accountSum
.
add
(
accountHead
.
getChangeamount
()
)
;
}
}
}
...
...
@@ -194,8 +199,8 @@ public class AccountService {
* @param id
* @return
*/
public
Double
getAccountSumByDetail
(
Long
id
,
String
timeStr
,
String
type
)
{
Double
accountSum
=
0.0
;
public
BigDecimal
getAccountSumByDetail
(
Long
id
,
String
timeStr
,
String
type
)
{
BigDecimal
accountSum
=
BigDecimal
.
ZERO
;
try
{
AccountHeadExample
example
=
new
AccountHeadExample
();
if
(!
timeStr
.
equals
(
""
))
{
...
...
@@ -229,7 +234,7 @@ public class AccountService {
if
(
dataListOne
!=
null
)
{
for
(
AccountItem
accountItem
:
dataListOne
)
{
if
(
accountItem
.
getEachamount
()!=
null
)
{
accountSum
=
accountSum
+
accountItem
.
getEachamount
();
accountSum
=
accountSum
.
add
(
accountItem
.
getEachamount
()
)
;
}
}
}
...
...
@@ -248,8 +253,8 @@ public class AccountService {
* @param id
* @return
*/
public
Double
getManyAccountSum
(
Long
id
,
String
timeStr
,
String
type
)
{
Double
accountSum
=
0.0
;
public
BigDecimal
getManyAccountSum
(
Long
id
,
String
timeStr
,
String
type
)
{
BigDecimal
accountSum
=
BigDecimal
.
ZERO
;
try
{
DepotHeadExample
example
=
new
DepotHeadExample
();
if
(!
timeStr
.
equals
(
""
))
{
...
...
@@ -277,7 +282,7 @@ public class AccountService {
String
[]
amList
=
accountMoneyList
.
split
(
","
);
for
(
int
i
=
0
;
i
<
aList
.
length
;
i
++)
{
if
(
aList
[
i
].
toString
().
equals
(
id
.
toString
()))
{
accountSum
=
accountSum
+
Double
.
parseDouble
(
amList
[
i
].
toString
(
));
accountSum
=
accountSum
.
add
(
new
BigDecimal
(
amList
[
i
]
));
}
}
}
...
...
@@ -296,6 +301,7 @@ public class AccountService {
return
accountMapper
.
findAccountInOutListCount
(
accountId
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateAmountIsDefault
(
Boolean
isDefault
,
Long
accountId
)
{
Account
account
=
new
Account
();
account
.
setIsdefault
(
isDefault
);
...
...
src/main/java/com/jsh/erp/service/accountHead/AccountHeadService.java
View file @
9550c031
...
...
@@ -10,9 +10,11 @@ import com.jsh.erp.utils.Tools;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -38,10 +40,10 @@ public class AccountHeadService {
if
(
null
!=
list
)
{
for
(
AccountHeadVo4ListEx
ah
:
list
)
{
if
(
ah
.
getChangeamount
()
!=
null
)
{
ah
.
setChangeamount
(
Math
.
abs
(
ah
.
getChangeamount
()));
ah
.
setChangeamount
(
ah
.
getChangeamount
()
.
abs
(
));
}
if
(
ah
.
getTotalprice
()
!=
null
)
{
ah
.
setTotalprice
(
Math
.
abs
(
ah
.
getTotalprice
()));
ah
.
setTotalprice
(
ah
.
getTotalprice
()
.
abs
(
));
}
resList
.
add
(
ah
);
}
...
...
@@ -53,21 +55,25 @@ public class AccountHeadService {
return
accountHeadMapper
.
countsByAccountHead
(
type
,
billNo
,
beginTime
,
endTime
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
insertAccountHead
(
String
beanJson
,
HttpServletRequest
request
)
{
AccountHead
accountHead
=
JSONObject
.
parseObject
(
beanJson
,
AccountHead
.
class
);
return
accountHeadMapper
.
insertSelective
(
accountHead
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateAccountHead
(
String
beanJson
,
Long
id
)
{
AccountHead
accountHead
=
JSONObject
.
parseObject
(
beanJson
,
AccountHead
.
class
);
accountHead
.
setId
(
id
);
return
accountHeadMapper
.
updateByPrimaryKeySelective
(
accountHead
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
deleteAccountHead
(
Long
id
)
{
return
accountHeadMapper
.
deleteByPrimaryKey
(
id
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
batchDeleteAccountHead
(
String
ids
)
{
List
<
Long
>
idList
=
StringUtil
.
strToLongList
(
ids
);
AccountHeadExample
example
=
new
AccountHeadExample
();
...
...
@@ -86,7 +92,7 @@ public class AccountHeadService {
return
accountHeadMapper
.
getMaxId
();
}
public
Double
findAllMoney
(
Integer
supplierId
,
String
type
,
String
mode
,
String
endTime
)
{
public
BigDecimal
findAllMoney
(
Integer
supplierId
,
String
type
,
String
mode
,
String
endTime
)
{
String
modeName
=
""
;
if
(
mode
.
equals
(
"实际"
))
{
modeName
=
"ChangeAmount"
;
...
...
@@ -102,10 +108,10 @@ public class AccountHeadService {
if
(
null
!=
list
)
{
for
(
AccountHeadVo4ListEx
ah
:
list
)
{
if
(
ah
.
getChangeamount
()
!=
null
)
{
ah
.
setChangeamount
(
Math
.
abs
(
ah
.
getChangeamount
()));
ah
.
setChangeamount
(
ah
.
getChangeamount
()
.
abs
(
));
}
if
(
ah
.
getTotalprice
()
!=
null
)
{
ah
.
setTotalprice
(
Math
.
abs
(
ah
.
getTotalprice
()));
ah
.
setTotalprice
(
ah
.
getTotalprice
()
.
abs
(
));
}
resList
.
add
(
ah
);
}
...
...
src/main/java/com/jsh/erp/service/accountItem/AccountItemService.java
View file @
9550c031
package
com.jsh.erp.service.accountItem
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jsh.erp.datasource.entities.AccountItem
;
import
com.jsh.erp.datasource.entities.AccountItemExample
;
import
com.jsh.erp.datasource.mappers.AccountItemMapper
;
import
com.jsh.erp.datasource.vo.AccountItemVo4List
;
import
com.jsh.erp.utils.ErpInfo
;
import
com.jsh.erp.utils.StringUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
static
com
.
jsh
.
erp
.
utils
.
ResponseJsonUtil
.
returnJson
;
@Service
public
class
AccountItemService
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
AccountItemService
.
class
);
...
...
@@ -38,21 +45,25 @@ public class AccountItemService {
return
accountItemMapper
.
countsByAccountItem
(
name
,
type
,
remark
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
insertAccountItem
(
String
beanJson
,
HttpServletRequest
request
)
{
AccountItem
accountItem
=
JSONObject
.
parseObject
(
beanJson
,
AccountItem
.
class
);
return
accountItemMapper
.
insertSelective
(
accountItem
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateAccountItem
(
String
beanJson
,
Long
id
)
{
AccountItem
accountItem
=
JSONObject
.
parseObject
(
beanJson
,
AccountItem
.
class
);
accountItem
.
setId
(
id
);
return
accountItemMapper
.
updateByPrimaryKeySelective
(
accountItem
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
deleteAccountItem
(
Long
id
)
{
return
accountItemMapper
.
deleteByPrimaryKey
(
id
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
batchDeleteAccountItem
(
String
ids
)
{
List
<
Long
>
idList
=
StringUtil
.
strToLongList
(
ids
);
AccountItemExample
example
=
new
AccountItemExample
();
...
...
@@ -67,10 +78,12 @@ public class AccountItemService {
return
list
.
size
();
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
insertAccountItemWithObj
(
AccountItem
accountItem
)
{
return
accountItemMapper
.
insertSelective
(
accountItem
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateAccountItemWithObj
(
AccountItem
accountItem
)
{
return
accountItemMapper
.
updateByPrimaryKeySelective
(
accountItem
);
}
...
...
@@ -78,4 +91,69 @@ public class AccountItemService {
public
List
<
AccountItemVo4List
>
getDetailList
(
Long
headerId
)
{
return
accountItemMapper
.
getDetailList
(
headerId
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
String
saveDetials
(
String
inserted
,
String
deleted
,
String
updated
,
Long
headerId
,
String
listType
)
throws
DataAccessException
{
//转为json
JSONArray
insertedJson
=
JSONArray
.
parseArray
(
inserted
);
JSONArray
deletedJson
=
JSONArray
.
parseArray
(
deleted
);
JSONArray
updatedJson
=
JSONArray
.
parseArray
(
updated
);
if
(
null
!=
insertedJson
)
{
for
(
int
i
=
0
;
i
<
insertedJson
.
size
();
i
++)
{
AccountItem
accountItem
=
new
AccountItem
();
JSONObject
tempInsertedJson
=
JSONObject
.
parseObject
(
insertedJson
.
getString
(
i
));
accountItem
.
setHeaderid
(
headerId
);
if
(
tempInsertedJson
.
get
(
"AccountId"
)
!=
null
&&
!
tempInsertedJson
.
get
(
"AccountId"
).
equals
(
""
))
{
accountItem
.
setAccountid
(
tempInsertedJson
.
getLong
(
"AccountId"
));
}
if
(
tempInsertedJson
.
get
(
"InOutItemId"
)
!=
null
&&
!
tempInsertedJson
.
get
(
"InOutItemId"
).
equals
(
""
))
{
accountItem
.
setInoutitemid
(
tempInsertedJson
.
getLong
(
"InOutItemId"
));
}
if
(
tempInsertedJson
.
get
(
"EachAmount"
)
!=
null
&&
!
tempInsertedJson
.
get
(
"EachAmount"
).
equals
(
""
))
{
BigDecimal
eachAmount
=
tempInsertedJson
.
getBigDecimal
(
"EachAmount"
);
if
(
listType
.
equals
(
"付款"
))
{
eachAmount
=
BigDecimal
.
ZERO
.
subtract
(
eachAmount
);
}
accountItem
.
setEachamount
(
eachAmount
);
}
else
{
accountItem
.
setEachamount
(
BigDecimal
.
ZERO
);
}
accountItem
.
setRemark
(
tempInsertedJson
.
getString
(
"Remark"
));
this
.
insertAccountItemWithObj
(
accountItem
);
}
}
if
(
null
!=
deletedJson
)
{
for
(
int
i
=
0
;
i
<
deletedJson
.
size
();
i
++)
{
JSONObject
tempDeletedJson
=
JSONObject
.
parseObject
(
deletedJson
.
getString
(
i
));
this
.
deleteAccountItem
(
tempDeletedJson
.
getLong
(
"Id"
));
}
}
if
(
null
!=
updatedJson
)
{
for
(
int
i
=
0
;
i
<
updatedJson
.
size
();
i
++)
{
JSONObject
tempUpdatedJson
=
JSONObject
.
parseObject
(
updatedJson
.
getString
(
i
));
AccountItem
accountItem
=
this
.
getAccountItem
(
tempUpdatedJson
.
getLong
(
"Id"
));
accountItem
.
setId
(
tempUpdatedJson
.
getLong
(
"Id"
));
accountItem
.
setHeaderid
(
headerId
);
if
(
tempUpdatedJson
.
get
(
"AccountId"
)
!=
null
&&
!
tempUpdatedJson
.
get
(
"AccountId"
).
equals
(
""
))
{
accountItem
.
setAccountid
(
tempUpdatedJson
.
getLong
(
"AccountId"
));
}
if
(
tempUpdatedJson
.
get
(
"InOutItemId"
)
!=
null
&&
!
tempUpdatedJson
.
get
(
"InOutItemId"
).
equals
(
""
))
{
accountItem
.
setInoutitemid
(
tempUpdatedJson
.
getLong
(
"InOutItemId"
));
}
if
(
tempUpdatedJson
.
get
(
"EachAmount"
)
!=
null
&&
!
tempUpdatedJson
.
get
(
"EachAmount"
).
equals
(
""
))
{
BigDecimal
eachAmount
=
tempUpdatedJson
.
getBigDecimal
(
"EachAmount"
);
if
(
listType
.
equals
(
"付款"
))
{
eachAmount
=
BigDecimal
.
ZERO
.
subtract
(
eachAmount
);
}
accountItem
.
setEachamount
(
eachAmount
);
}
else
{
accountItem
.
setEachamount
(
BigDecimal
.
ZERO
);
}
accountItem
.
setRemark
(
tempUpdatedJson
.
getString
(
"Remark"
));
this
.
updateAccountItemWithObj
(
accountItem
);
}
}
return
null
;
}
}
src/main/java/com/jsh/erp/service/app/AppService.java
View file @
9550c031
...
...
@@ -8,6 +8,7 @@ import com.jsh.erp.utils.StringUtil;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -27,7 +28,14 @@ public class AppService {
List
<
App
>
list
=
appMapper
.
selectByExample
(
example
);
return
list
;
}
/**
* create by: cjl
* description:
* 桌面功能菜单初始化列表
* create time: 2019/1/11 16:59
* @Param: null
* @return
*/
public
List
<
App
>
findDesk
(){
AppExample
example
=
new
AppExample
();
example
.
createCriteria
().
andZlEqualTo
(
"desk"
).
andEnabledEqualTo
(
true
);
...
...
@@ -53,21 +61,25 @@ public class AppService {
return
appMapper
.
countsByApp
(
name
,
type
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
insertApp
(
String
beanJson
,
HttpServletRequest
request
)
{
App
app
=
JSONObject
.
parseObject
(
beanJson
,
App
.
class
);
return
appMapper
.
insertSelective
(
app
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateApp
(
String
beanJson
,
Long
id
)
{
App
app
=
JSONObject
.
parseObject
(
beanJson
,
App
.
class
);
app
.
setId
(
id
);
return
appMapper
.
updateByPrimaryKeySelective
(
app
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
deleteApp
(
Long
id
)
{
return
appMapper
.
deleteByPrimaryKey
(
id
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
batchDeleteApp
(
String
ids
)
{
List
<
Long
>
idList
=
StringUtil
.
strToLongList
(
ids
);
AppExample
example
=
new
AppExample
();
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Supports
Markdown
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