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
2f77dfbf
Commit
2f77dfbf
authored
Jul 29, 2019
by
qiankunpingtai
Browse files
从源更新
parents
331ca3e3
0e46a9f2
Changes
58
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/datasource/entities/MaterialVo4Unit.java
View file @
2f77dfbf
...
...
@@ -10,6 +10,8 @@ public class MaterialVo4Unit extends Material{
private
String
materialOther
;
private
Long
stock
;
public
String
getUnitName
()
{
return
unitName
;
}
...
...
@@ -33,4 +35,12 @@ public class MaterialVo4Unit extends Material{
public
void
setMaterialOther
(
String
materialOther
)
{
this
.
materialOther
=
materialOther
;
}
public
Long
getStock
()
{
return
stock
;
}
public
void
setStock
(
Long
stock
)
{
this
.
stock
=
stock
;
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/AssetCategoryMapper.java
deleted
100644 → 0
View file @
331ca3e3
package
com.jsh.erp.datasource.mappers
;
import
com.jsh.erp.datasource.entities.AssetCategory
;
import
com.jsh.erp.datasource.entities.AssetCategoryExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
AssetCategoryMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int
countByExample
(
AssetCategoryExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int
deleteByExample
(
AssetCategoryExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int
insert
(
AssetCategory
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int
insertSelective
(
AssetCategory
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
List
<
AssetCategory
>
selectByExample
(
AssetCategoryExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
AssetCategory
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
AssetCategory
record
,
@Param
(
"example"
)
AssetCategoryExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int
updateByExample
(
@Param
(
"record"
)
AssetCategory
record
,
@Param
(
"example"
)
AssetCategoryExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int
updateByPrimaryKeySelective
(
AssetCategory
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetcategory
*
* @mbggenerated
*/
int
updateByPrimaryKey
(
AssetCategory
record
);
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/AssetMapper.java
deleted
100644 → 0
View file @
331ca3e3
package
com.jsh.erp.datasource.mappers
;
import
com.jsh.erp.datasource.entities.Asset
;
import
com.jsh.erp.datasource.entities.AssetExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
AssetMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
countByExample
(
AssetExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
deleteByExample
(
AssetExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
insert
(
Asset
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
insertSelective
(
Asset
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
List
<
Asset
>
selectByExampleWithBLOBs
(
AssetExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
List
<
Asset
>
selectByExample
(
AssetExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
Asset
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
Asset
record
,
@Param
(
"example"
)
AssetExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
Asset
record
,
@Param
(
"example"
)
AssetExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
updateByExample
(
@Param
(
"record"
)
Asset
record
,
@Param
(
"example"
)
AssetExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
updateByPrimaryKeySelective
(
Asset
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
updateByPrimaryKeyWithBLOBs
(
Asset
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_asset
*
* @mbggenerated
*/
int
updateByPrimaryKey
(
Asset
record
);
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/AssetNameMapper.java
deleted
100644 → 0
View file @
331ca3e3
package
com.jsh.erp.datasource.mappers
;
import
com.jsh.erp.datasource.entities.AssetName
;
import
com.jsh.erp.datasource.entities.AssetNameExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
AssetNameMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
countByExample
(
AssetNameExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
deleteByExample
(
AssetNameExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
insert
(
AssetName
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
insertSelective
(
AssetName
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
List
<
AssetName
>
selectByExampleWithBLOBs
(
AssetNameExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
List
<
AssetName
>
selectByExample
(
AssetNameExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
AssetName
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
AssetName
record
,
@Param
(
"example"
)
AssetNameExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
AssetName
record
,
@Param
(
"example"
)
AssetNameExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
updateByExample
(
@Param
(
"record"
)
AssetName
record
,
@Param
(
"example"
)
AssetNameExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
updateByPrimaryKeySelective
(
AssetName
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
updateByPrimaryKeyWithBLOBs
(
AssetName
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_assetname
*
* @mbggenerated
*/
int
updateByPrimaryKey
(
AssetName
record
);
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java
View file @
2f77dfbf
...
...
@@ -110,10 +110,11 @@ public interface DepotHeadMapperEx {
* */
void
updatedepotHead
(
DepotHead
depotHead
);
void
updateBuildOnlyNumber
();
/**
* 获得一个全局唯一的数作为订单号的追加
* */
Long
getBuildOnlyNumber
(
@Param
(
"seq_name"
)
String
seq_name
);
Long
getBuildOnlyNumber
(
@Param
(
"seq_name"
)
String
seq_name
);
int
batchDeleteDepotHeadByIds
(
@Param
(
"updateTime"
)
Date
updateTime
,
@Param
(
"updater"
)
Long
updater
,
@Param
(
"ids"
)
String
ids
[]);
...
...
src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapperEx.java
View file @
2f77dfbf
...
...
@@ -45,10 +45,10 @@ public interface DepotItemMapperEx {
@Param
(
"mId"
)
Long
mId
,
@Param
(
"monthTime"
)
String
monthTime
);
int
findByTypeAndMaterialIdIn
(
Long
findByTypeAndMaterialIdIn
(
@Param
(
"mId"
)
Long
mId
);
int
findByTypeAndMaterialIdOut
(
Long
findByTypeAndMaterialIdOut
(
@Param
(
"mId"
)
Long
mId
);
int
findByTypeAndDepotIdAndMaterialIdIn
(
...
...
src/main/java/com/jsh/erp/datasource/mappers/MaterialMapperEx.java
View file @
2f77dfbf
...
...
@@ -20,7 +20,6 @@ public interface MaterialMapperEx {
List
<
MaterialVo4Unit
>
selectByConditionMaterial
(
@Param
(
"name"
)
String
name
,
@Param
(
"model"
)
String
model
,
@Param
(
"categoryId"
)
Long
categoryId
,
@Param
(
"categoryIds"
)
String
categoryIds
,
@Param
(
"mpList"
)
String
mpList
,
@Param
(
"offset"
)
Integer
offset
,
...
...
@@ -29,7 +28,6 @@ public interface MaterialMapperEx {
Long
countsByMaterial
(
@Param
(
"name"
)
String
name
,
@Param
(
"model"
)
String
model
,
@Param
(
"categoryId"
)
Long
categoryId
,
@Param
(
"categoryIds"
)
String
categoryIds
,
@Param
(
"mpList"
)
String
mpList
);
...
...
@@ -46,7 +44,6 @@ public interface MaterialMapperEx {
List
<
MaterialVo4Unit
>
findByAll
(
@Param
(
"name"
)
String
name
,
@Param
(
"model"
)
String
model
,
@Param
(
"categoryId"
)
Long
categoryId
,
@Param
(
"categoryIds"
)
String
categoryIds
);
/**
* 通过商品名称查询商品信息
...
...
src/main/java/com/jsh/erp/service/ResourceInfo.java
View file @
2f77dfbf
...
...
@@ -24,6 +24,10 @@ import java.lang.annotation.*;
* depotItem-90
* accountHead-95
* accountItem-100
* serialNumber-105
* organization-110
* orgaUserRel-115
* tenant-120
*/
@Target
({
ElementType
.
TYPE
,
ElementType
.
ANNOTATION_TYPE
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
...
...
src/main/java/com/jsh/erp/service/accountHead/AccountHeadService.java
View file @
2f77dfbf
...
...
@@ -208,6 +208,56 @@ public class AccountHeadService {
return
result
;
}
/**
* 统计总金额
* @param getS
* @param type
* @param mode 合计或者金额
* @param endTime
* @return
*/
public
BigDecimal
allMoney
(
String
getS
,
String
type
,
String
mode
,
String
endTime
)
{
BigDecimal
allMoney
=
BigDecimal
.
ZERO
;
try
{
Integer
supplierId
=
Integer
.
valueOf
(
getS
);
BigDecimal
sum
=
findAllMoney
(
supplierId
,
type
,
mode
,
endTime
);
if
(
sum
!=
null
)
{
allMoney
=
sum
;
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
//返回正数,如果负数也转为正数
if
((
allMoney
.
compareTo
(
BigDecimal
.
ZERO
))==-
1
)
{
allMoney
=
allMoney
.
abs
();
}
return
allMoney
;
}
/**
* 查询单位的累计应收和累计应付,收预付款不计入此处
* @param supplierId
* @param endTime
* @param supType
* @return
*/
public
BigDecimal
findTotalPay
(
Integer
supplierId
,
String
endTime
,
String
supType
)
{
BigDecimal
sum
=
BigDecimal
.
ZERO
;
String
getS
=
supplierId
.
toString
();
int
i
=
1
;
if
((
"customer"
).
equals
(
supType
))
{
//客户
i
=
1
;
}
else
if
((
"vendor"
).
equals
(
supType
))
{
//供应商
i
=
-
1
;
}
//收付款部分
sum
=
sum
.
add
((
allMoney
(
getS
,
"付款"
,
"合计"
,
endTime
).
add
(
allMoney
(
getS
,
"付款"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
subtract
((
allMoney
(
getS
,
"收款"
,
"合计"
,
endTime
).
add
(
allMoney
(
getS
,
"收款"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
add
((
allMoney
(
getS
,
"收入"
,
"合计"
,
endTime
).
subtract
(
allMoney
(
getS
,
"收入"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
subtract
((
allMoney
(
getS
,
"支出"
,
"合计"
,
endTime
).
subtract
(
allMoney
(
getS
,
"支出"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
return
sum
;
}
public
List
<
AccountHeadVo4ListEx
>
getDetailByNumber
(
String
billNo
)
throws
Exception
{
List
<
AccountHeadVo4ListEx
>
resList
=
new
ArrayList
<
AccountHeadVo4ListEx
>();
List
<
AccountHeadVo4ListEx
>
list
=
null
;
...
...
src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
2f77dfbf
...
...
@@ -264,10 +264,12 @@ public class DepotHeadService {
/**
* 创建一个唯一的序列号
* */
public
String
buildOnlyNumber
()
throws
Exception
{
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
String
buildOnlyNumber
()
throws
Exception
{
Long
buildOnlyNumber
=
null
;
synchronized
(
this
){
try
{
depotHeadMapperEx
.
updateBuildOnlyNumber
();
//编号+1
buildOnlyNumber
=
depotHeadMapperEx
.
getBuildOnlyNumber
(
BusinessConstants
.
DEPOT_NUMBER_SEQ
);
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
...
...
@@ -275,7 +277,6 @@ public class DepotHeadService {
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
DATA_WRITE_FAIL_CODE
,
ExceptionConstants
.
DATA_WRITE_FAIL_MSG
);
}
}
if
(
buildOnlyNumber
<
BusinessConstants
.
SEQ_TO_STRING_MIN_LENGTH
){
StringBuffer
sb
=
new
StringBuffer
(
buildOnlyNumber
.
toString
());
...
...
@@ -434,6 +435,56 @@ public class DepotHeadService {
return
result
;
}
/**
* 统计总金额
* @param getS
* @param type
* @param subType
* @param mode 合计或者金额
* @return
*/
public
BigDecimal
allMoney
(
String
getS
,
String
type
,
String
subType
,
String
mode
,
String
endTime
)
{
BigDecimal
allMoney
=
BigDecimal
.
ZERO
;
try
{
Integer
supplierId
=
Integer
.
valueOf
(
getS
);
BigDecimal
sum
=
findAllMoney
(
supplierId
,
type
,
subType
,
mode
,
endTime
);
if
(
sum
!=
null
)
{
allMoney
=
sum
;
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
//返回正数,如果负数也转为正数
if
((
allMoney
.
compareTo
(
BigDecimal
.
ZERO
))==-
1
)
{
allMoney
=
allMoney
.
abs
();
}
return
allMoney
;
}
/**
* 查询单位的累计应收和累计应付,零售不能计入
* @param supplierId
* @param endTime
* @param supType
* @return
*/
public
BigDecimal
findTotalPay
(
Integer
supplierId
,
String
endTime
,
String
supType
)
{
BigDecimal
sum
=
BigDecimal
.
ZERO
;
String
getS
=
supplierId
.
toString
();
int
i
=
1
;
if
((
"customer"
).
equals
(
supType
))
{
//客户
i
=
1
;
}
else
if
((
"vendor"
).
equals
(
supType
))
{
//供应商
i
=
-
1
;
}
//进销部分
sum
=
sum
.
subtract
((
allMoney
(
getS
,
"入库"
,
"采购"
,
"合计"
,
endTime
).
subtract
(
allMoney
(
getS
,
"入库"
,
"采购"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
subtract
((
allMoney
(
getS
,
"入库"
,
"销售退货"
,
"合计"
,
endTime
).
subtract
(
allMoney
(
getS
,
"入库"
,
"销售退货"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
add
((
allMoney
(
getS
,
"出库"
,
"销售"
,
"合计"
,
endTime
).
subtract
(
allMoney
(
getS
,
"出库"
,
"销售"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
add
((
allMoney
(
getS
,
"出库"
,
"采购退货"
,
"合计"
,
endTime
).
subtract
(
allMoney
(
getS
,
"出库"
,
"采购退货"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
return
sum
;
}
public
List
<
DepotHeadVo4List
>
getDetailByNumber
(
String
number
)
throws
Exception
{
List
<
DepotHeadVo4List
>
resList
=
new
ArrayList
<
DepotHeadVo4List
>();
List
<
DepotHeadVo4List
>
list
=
null
;
...
...
src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
2f77dfbf
...
...
@@ -291,8 +291,8 @@ public class DepotItemService {
return
depotItemMapper
.
updateByPrimaryKeySelective
(
depotItem
);
}
public
int
findByTypeAndMaterialId
(
String
type
,
Long
mId
)
throws
Exception
{
int
result
=
0
;
public
Long
findByTypeAndMaterialId
(
String
type
,
Long
mId
)
throws
Exception
{
Long
result
=
0
l
;
try
{
if
(
type
.
equals
(
TYPE
))
{
result
=
depotItemMapperEx
.
findByTypeAndMaterialIdIn
(
mId
);
...
...
src/main/java/com/jsh/erp/service/material/MaterialComponent.java
View file @
2f77dfbf
...
...
@@ -34,11 +34,10 @@ public class MaterialComponent implements ICommonQuery {
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
String
model
=
StringUtil
.
getInfo
(
search
,
"model"
);
Long
categoryId
=
Long
.
parseLong
(
StringUtil
.
getInfo
(
search
,
"categoryId"
));
String
categoryIds
=
StringUtil
.
getInfo
(
search
,
"categoryIds"
);
String
mpList
=
StringUtil
.
getInfo
(
search
,
"mpList"
);
String
order
=
QueryUtils
.
order
(
map
);
return
materialService
.
select
(
name
,
model
,
categoryId
,
categoryIds
,
mpList
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
return
materialService
.
select
(
name
,
model
,
categoryIds
,
mpList
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
}
@Override
...
...
@@ -46,10 +45,9 @@ public class MaterialComponent implements ICommonQuery {
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
String
model
=
StringUtil
.
getInfo
(
search
,
"model"
);
Long
categoryId
=
Long
.
parseLong
(
StringUtil
.
getInfo
(
search
,
"categoryId"
));
String
categoryIds
=
StringUtil
.
getInfo
(
search
,
"categoryIds"
);
String
mpList
=
StringUtil
.
getInfo
(
search
,
"mpList"
);
return
materialService
.
countMaterial
(
name
,
model
,
categoryId
,
categoryIds
,
mpList
);
return
materialService
.
countMaterial
(
name
,
model
,
categoryIds
,
mpList
);
}
@Override
...
...
src/main/java/com/jsh/erp/service/material/MaterialService.java
View file @
2f77dfbf
...
...
@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.mappers.DepotItemMapperEx;
import
com.jsh.erp.datasource.mappers.MaterialMapper
;
import
com.jsh.erp.datasource.mappers.MaterialMapperEx
;
import
com.jsh.erp.exception.BusinessRunTimeException
;
import
com.jsh.erp.service.depotItem.DepotItemService
;
import
com.jsh.erp.service.log.LogService
;
import
com.jsh.erp.service.user.UserService
;
import
com.jsh.erp.utils.BaseResponseInfo
;
...
...
@@ -38,6 +39,8 @@ public class MaterialService {
private
UserService
userService
;
@Resource
private
DepotItemMapperEx
depotItemMapperEx
;
@Resource
private
DepotItemService
depotItemService
;
public
Material
getMaterial
(
long
id
)
throws
Exception
{
Material
result
=
null
;
...
...
@@ -67,13 +70,13 @@ public class MaterialService {
return
list
;
}
public
List
<
MaterialVo4Unit
>
select
(
String
name
,
String
model
,
Long
categoryId
,
String
categoryIds
,
String
mpList
,
int
offset
,
int
rows
)
public
List
<
MaterialVo4Unit
>
select
(
String
name
,
String
model
,
String
categoryIds
,
String
mpList
,
int
offset
,
int
rows
)
throws
Exception
{
String
[]
mpArr
=
mpList
.
split
(
","
);
List
<
MaterialVo4Unit
>
resList
=
new
ArrayList
<
MaterialVo4Unit
>();
List
<
MaterialVo4Unit
>
list
=
null
;
try
{
list
=
materialMapperEx
.
selectByConditionMaterial
(
name
,
model
,
categoryId
,
categoryIds
,
mpList
,
offset
,
rows
);
list
=
materialMapperEx
.
selectByConditionMaterial
(
name
,
model
,
categoryIds
,
mpList
,
offset
,
rows
);
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
ExceptionConstants
.
DATA_READ_FAIL_CODE
,
ExceptionConstants
.
DATA_READ_FAIL_MSG
,
e
);
...
...
@@ -105,16 +108,19 @@ public class MaterialService {
}
}
m
.
setMaterialOther
(
materialOther
);
Long
InSum
=
depotItemService
.
findByTypeAndMaterialId
(
"入库"
,
m
.
getId
());
Long
OutSum
=
depotItemService
.
findByTypeAndMaterialId
(
"出库"
,
m
.
getId
());
m
.
setStock
(
InSum
-
OutSum
);
resList
.
add
(
m
);
}
}
return
resList
;
}
public
Long
countMaterial
(
String
name
,
String
model
,
Long
categoryId
,
String
categoryIds
,
String
mpList
)
throws
Exception
{
public
Long
countMaterial
(
String
name
,
String
model
,
String
categoryIds
,
String
mpList
)
throws
Exception
{
Long
result
=
null
;
try
{
result
=
materialMapperEx
.
countsByMaterial
(
name
,
model
,
categoryId
,
categoryIds
,
mpList
);
result
=
materialMapperEx
.
countsByMaterial
(
name
,
model
,
categoryIds
,
mpList
);
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
ExceptionConstants
.
DATA_READ_FAIL_CODE
,
ExceptionConstants
.
DATA_READ_FAIL_MSG
,
e
);
...
...
@@ -314,11 +320,11 @@ public class MaterialService {
return
list
;
}
public
List
<
MaterialVo4Unit
>
findByAll
(
String
name
,
String
model
,
Long
categoryId
,
String
categoryIds
)
throws
Exception
{
public
List
<
MaterialVo4Unit
>
findByAll
(
String
name
,
String
model
,
String
categoryIds
)
throws
Exception
{
List
<
MaterialVo4Unit
>
resList
=
new
ArrayList
<
MaterialVo4Unit
>();
List
<
MaterialVo4Unit
>
list
=
null
;
try
{
list
=
materialMapperEx
.
findByAll
(
name
,
model
,
categoryId
,
categoryIds
);
list
=
materialMapperEx
.
findByAll
(
name
,
model
,
categoryIds
);
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
ExceptionConstants
.
DATA_READ_FAIL_CODE
,
ExceptionConstants
.
DATA_READ_FAIL_MSG
,
e
);
...
...
src/main/java/com/jsh/erp/service/materialCategory/MaterialCategoryService.java
View file @
2f77dfbf
...
...
@@ -22,6 +22,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -68,12 +69,9 @@ public class MaterialCategoryService {
}
public
List
<
MaterialCategory
>
getAllList
(
Long
parentId
)
throws
Exception
{
MaterialCategoryExample
example
=
new
MaterialCategoryExample
();
example
.
createCriteria
().
andParentidEqualTo
(
parentId
).
andIdNotEqualTo
(
1
l
);
example
.
setOrderByClause
(
"id"
);
List
<
MaterialCategory
>
list
=
null
;
try
{
list
=
materialCategoryMapper
.
selectByExample
(
example
);
list
=
getMCList
(
parentId
);
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
ExceptionConstants
.
DATA_READ_FAIL_CODE
,
ExceptionConstants
.
DATA_READ_FAIL_MSG
,
e
);
...
...
@@ -83,6 +81,25 @@ public class MaterialCategoryService {
return
list
;
}
public
List
<
MaterialCategory
>
getMCList
(
Long
parentId
)
throws
Exception
{
List
<
MaterialCategory
>
res
=
new
ArrayList
<
MaterialCategory
>();
List
<
MaterialCategory
>
list
=
null
;
MaterialCategoryExample
example
=
new
MaterialCategoryExample
();
example
.
createCriteria
().
andParentidEqualTo
(
parentId
).
andIdNotEqualTo
(
1
l
);
example
.
setOrderByClause
(
"id"
);
list
=
materialCategoryMapper
.
selectByExample
(
example
);
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
res
.
addAll
(
list
);
for
(
MaterialCategory
mc
:
list
)
{
List
<
MaterialCategory
>
mcList
=
getMCList
(
mc
.
getId
());
if
(
mcList
!=
null
&&
mcList
.
size
()>
0
)
{
res
.
addAll
(
mcList
);
}
}
}
return
res
;
}
public
List
<
MaterialCategory
>
select
(
String
name
,
Integer
parentId
,
int
offset
,
int
rows
)
throws
Exception
{
List
<
MaterialCategory
>
list
=
null
;
try
{
...
...
src/main/java/com/jsh/erp/service/supplier/SupplierService.java
View file @
2f77dfbf
...
...
@@ -10,6 +10,8 @@ import com.jsh.erp.datasource.mappers.DepotHeadMapperEx;
import
com.jsh.erp.datasource.mappers.SupplierMapper
;
import
com.jsh.erp.datasource.mappers.SupplierMapperEx
;
import
com.jsh.erp.exception.BusinessRunTimeException
;
import
com.jsh.erp.service.accountHead.AccountHeadService
;
import
com.jsh.erp.service.depotHead.DepotHeadService
;
import
com.jsh.erp.service.log.LogService
;
import
com.jsh.erp.service.user.UserService
;
import
com.jsh.erp.utils.BaseResponseInfo
;
...
...
@@ -24,10 +26,9 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
static
com
.
jsh
.
erp
.
utils
.
Tools
.
getNow3
;
@Service
public
class
SupplierService
{
...
...
@@ -46,6 +47,10 @@ public class SupplierService {
private
AccountHeadMapperEx
accountHeadMapperEx
;
@Resource
private
DepotHeadMapperEx
depotHeadMapperEx
;
@Resource
private
DepotHeadService
depotHeadService
;
@Resource
private
AccountHeadService
accountHeadService
;
public
Supplier
getSupplier
(
long
id
)
throws
Exception
{
Supplier
result
=
null
;
...
...
@@ -77,16 +82,47 @@ public class SupplierService {
public
List
<
Supplier
>
select
(
String
supplier
,
String
type
,
String
phonenum
,
String
telephone
,
String
description
,
int
offset
,
int
rows
)
throws
Exception
{
List
<
Supplier
>
list
=
null
;
List
<
Supplier
>
resList
=
new
ArrayList
<
Supplier
>()
;
try
{
list
=
supplierMapperEx
.
selectByConditionSupplier
(
supplier
,
type
,
phonenum
,
telephone
,
description
,
offset
,
rows
);
List
<
Supplier
>
list
=
supplierMapperEx
.
selectByConditionSupplier
(
supplier
,
type
,
phonenum
,
telephone
,
description
,
offset
,
rows
);
for
(
Supplier
s
:
list
)
{
Integer
supplierId
=
s
.
getId
().
intValue
();
String
endTime
=
getNow3
();
String
supType
=
null
;
if
((
"客户"
).
equals
(
s
.
getType
()))
{
supType
=
"customer"
;
}
else
if
((
"供应商"
).
equals
(
s
.
getType
()))
{
supType
=
"vendor"
;
}
BigDecimal
sum
=
BigDecimal
.
ZERO
;
BigDecimal
beginNeedGet
=
s
.
getBeginneedget
();
if
(
beginNeedGet
==
null
)
{
beginNeedGet
=
BigDecimal
.
ZERO
;
}
BigDecimal
beginNeedPay
=
s
.
getBeginneedpay
();
if
(
beginNeedPay
==
null
)
{
beginNeedPay
=
BigDecimal
.
ZERO
;
}
sum
=
sum
.
add
(
depotHeadService
.
findTotalPay
(
supplierId
,
endTime
,
supType
));
sum
=
sum
.
add
(
accountHeadService
.
findTotalPay
(
supplierId
,
endTime
,
supType
));
if
((
"客户"
).
equals
(
s
.
getType
()))
{
sum
=
sum
.
add
(
beginNeedGet
).
subtract
(
beginNeedPay
);
s
.
setAllneedget
(
sum
);
s
.
setAllneedpay
(
BigDecimal
.
ZERO
);
}
else
if
((
"供应商"
).
equals
(
s
.
getType
()))
{
sum
=
sum
.
add
(
beginNeedPay
).
subtract
(
beginNeedGet
);
s
.
setAllneedget
(
BigDecimal
.
ZERO
);
s
.
setAllneedpay
(
sum
);
}
resList
.
add
(
s
);
}
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
ExceptionConstants
.
DATA_READ_FAIL_CODE
,
ExceptionConstants
.
DATA_READ_FAIL_MSG
,
e
);
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
DATA_READ_FAIL_CODE
,
ExceptionConstants
.
DATA_READ_FAIL_MSG
);
}
return
l
ist
;
return
resL
ist
;
}
public
Long
countSupplier
(
String
supplier
,
String
type
,
String
phonenum
,
String
telephone
,
String
description
)
throws
Exception
{
...
...
src/main/resources/mapper_xml/AssetCategoryMapper.xml
deleted
100644 → 0
View file @
331ca3e3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.AssetCategoryMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.AssetCategory"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"assetname"
jdbcType=
"VARCHAR"
property=
"assetname"
/>
<result
column=
"isystem"
jdbcType=
"TINYINT"
property=
"isystem"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"delete_Flag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetname, isystem, description, tenant_id, delete_Flag
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.AssetCategoryExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from jsh_assetcategory
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_assetcategory
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetcategory
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.AssetCategoryExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetcategory
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.AssetCategory"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetcategory (id, assetname, isystem,
description, tenant_id, delete_Flag
)
values (#{id,jdbcType=BIGINT}, #{assetname,jdbcType=VARCHAR}, #{isystem,jdbcType=TINYINT},
#{description,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.AssetCategory"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetcategory
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"assetname != null"
>
assetname,
</if>
<if
test=
"isystem != null"
>
isystem,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"tenantId != null"
>
tenant_id,
</if>
<if
test=
"deleteFlag != null"
>
delete_Flag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"assetname != null"
>
#{assetname,jdbcType=VARCHAR},
</if>
<if
test=
"isystem != null"
>
#{isystem,jdbcType=TINYINT},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=VARCHAR},
</if>
<if
test=
"tenantId != null"
>
#{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.AssetCategoryExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_assetcategory
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.assetname != null"
>
assetname = #{record.assetname,jdbcType=VARCHAR},
</if>
<if
test=
"record.isystem != null"
>
isystem = #{record.isystem,jdbcType=TINYINT},
</if>
<if
test=
"record.description != null"
>
description = #{record.description,jdbcType=VARCHAR},
</if>
<if
test=
"record.tenantId != null"
>
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
isystem = #{record.isystem,jdbcType=TINYINT},
description = #{record.description,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.AssetCategory"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
<set>
<if
test=
"assetname != null"
>
assetname = #{assetname,jdbcType=VARCHAR},
</if>
<if
test=
"isystem != null"
>
isystem = #{isystem,jdbcType=TINYINT},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
</if>
<if
test=
"tenantId != null"
>
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.AssetCategory"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
set assetname = #{assetname,jdbcType=VARCHAR},
isystem = #{isystem,jdbcType=TINYINT},
description = #{description,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/AssetMapper.xml
deleted
100644 → 0
View file @
331ca3e3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.AssetMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Asset"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"assetnameID"
jdbcType=
"BIGINT"
property=
"assetnameid"
/>
<result
column=
"location"
jdbcType=
"VARCHAR"
property=
"location"
/>
<result
column=
"labels"
jdbcType=
"VARCHAR"
property=
"labels"
/>
<result
column=
"status"
jdbcType=
"SMALLINT"
property=
"status"
/>
<result
column=
"userID"
jdbcType=
"BIGINT"
property=
"userid"
/>
<result
column=
"price"
jdbcType=
"DECIMAL"
property=
"price"
/>
<result
column=
"purchasedate"
jdbcType=
"TIMESTAMP"
property=
"purchasedate"
/>
<result
column=
"periodofvalidity"
jdbcType=
"TIMESTAMP"
property=
"periodofvalidity"
/>
<result
column=
"warrantydate"
jdbcType=
"TIMESTAMP"
property=
"warrantydate"
/>
<result
column=
"assetnum"
jdbcType=
"VARCHAR"
property=
"assetnum"
/>
<result
column=
"serialnum"
jdbcType=
"VARCHAR"
property=
"serialnum"
/>
<result
column=
"supplier"
jdbcType=
"BIGINT"
property=
"supplier"
/>
<result
column=
"createtime"
jdbcType=
"TIMESTAMP"
property=
"createtime"
/>
<result
column=
"creator"
jdbcType=
"BIGINT"
property=
"creator"
/>
<result
column=
"updatetime"
jdbcType=
"TIMESTAMP"
property=
"updatetime"
/>
<result
column=
"updator"
jdbcType=
"BIGINT"
property=
"updator"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"delete_Flag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.jsh.erp.datasource.entities.Asset"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result
column=
"description"
jdbcType=
"LONGVARCHAR"
property=
"description"
/>
<result
column=
"addMonth"
jdbcType=
"LONGVARCHAR"
property=
"addmonth"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetnameID, location, labels, status, userID, price, purchasedate, periodofvalidity,
warrantydate, assetnum, serialnum, supplier, createtime, creator, updatetime, updator,
tenant_id, delete_Flag
</sql>
<sql
id=
"Blob_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
description, addMonth
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"com.jsh.erp.datasource.entities.AssetExample"
resultMap=
"ResultMapWithBLOBs"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from jsh_asset
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.AssetExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from jsh_asset
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"ResultMapWithBLOBs"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from jsh_asset
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_asset
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.AssetExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_asset
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.Asset"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_asset (id, assetnameID, location,
labels, status, userID,
price, purchasedate, periodofvalidity,
warrantydate, assetnum, serialnum,
supplier, createtime, creator,
updatetime, updator, tenant_id,
delete_Flag, description, addMonth
)
values (#{id,jdbcType=BIGINT}, #{assetnameid,jdbcType=BIGINT}, #{location,jdbcType=VARCHAR},
#{labels,jdbcType=VARCHAR}, #{status,jdbcType=SMALLINT}, #{userid,jdbcType=BIGINT},
#{price,jdbcType=DECIMAL}, #{purchasedate,jdbcType=TIMESTAMP}, #{periodofvalidity,jdbcType=TIMESTAMP},
#{warrantydate,jdbcType=TIMESTAMP}, #{assetnum,jdbcType=VARCHAR}, #{serialnum,jdbcType=VARCHAR},
#{supplier,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT},
#{updatetime,jdbcType=TIMESTAMP}, #{updator,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}, #{addmonth,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.Asset"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_asset
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"assetnameid != null"
>
assetnameID,
</if>
<if
test=
"location != null"
>
location,
</if>
<if
test=
"labels != null"
>
labels,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"userid != null"
>
userID,
</if>
<if
test=
"price != null"
>
price,
</if>
<if
test=
"purchasedate != null"
>
purchasedate,
</if>
<if
test=
"periodofvalidity != null"
>
periodofvalidity,
</if>
<if
test=
"warrantydate != null"
>
warrantydate,
</if>
<if
test=
"assetnum != null"
>
assetnum,
</if>
<if
test=
"serialnum != null"
>
serialnum,
</if>
<if
test=
"supplier != null"
>
supplier,
</if>
<if
test=
"createtime != null"
>
createtime,
</if>
<if
test=
"creator != null"
>
creator,
</if>
<if
test=
"updatetime != null"
>
updatetime,
</if>
<if
test=
"updator != null"
>
updator,
</if>
<if
test=
"tenantId != null"
>
tenant_id,
</if>
<if
test=
"deleteFlag != null"
>
delete_Flag,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"addmonth != null"
>
addMonth,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"assetnameid != null"
>
#{assetnameid,jdbcType=BIGINT},
</if>
<if
test=
"location != null"
>
#{location,jdbcType=VARCHAR},
</if>
<if
test=
"labels != null"
>
#{labels,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=SMALLINT},
</if>
<if
test=
"userid != null"
>
#{userid,jdbcType=BIGINT},
</if>
<if
test=
"price != null"
>
#{price,jdbcType=DECIMAL},
</if>
<if
test=
"purchasedate != null"
>
#{purchasedate,jdbcType=TIMESTAMP},
</if>
<if
test=
"periodofvalidity != null"
>
#{periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if
test=
"warrantydate != null"
>
#{warrantydate,jdbcType=TIMESTAMP},
</if>
<if
test=
"assetnum != null"
>
#{assetnum,jdbcType=VARCHAR},
</if>
<if
test=
"serialnum != null"
>
#{serialnum,jdbcType=VARCHAR},
</if>
<if
test=
"supplier != null"
>
#{supplier,jdbcType=BIGINT},
</if>
<if
test=
"createtime != null"
>
#{createtime,jdbcType=TIMESTAMP},
</if>
<if
test=
"creator != null"
>
#{creator,jdbcType=BIGINT},
</if>
<if
test=
"updatetime != null"
>
#{updatetime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updator != null"
>
#{updator,jdbcType=BIGINT},
</if>
<if
test=
"tenantId != null"
>
#{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=LONGVARCHAR},
</if>
<if
test=
"addmonth != null"
>
#{addmonth,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.AssetExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_asset
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.assetnameid != null"
>
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
</if>
<if
test=
"record.location != null"
>
location = #{record.location,jdbcType=VARCHAR},
</if>
<if
test=
"record.labels != null"
>
labels = #{record.labels,jdbcType=VARCHAR},
</if>
<if
test=
"record.status != null"
>
status = #{record.status,jdbcType=SMALLINT},
</if>
<if
test=
"record.userid != null"
>
userID = #{record.userid,jdbcType=BIGINT},
</if>
<if
test=
"record.price != null"
>
price = #{record.price,jdbcType=DECIMAL},
</if>
<if
test=
"record.purchasedate != null"
>
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.periodofvalidity != null"
>
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.warrantydate != null"
>
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.assetnum != null"
>
assetnum = #{record.assetnum,jdbcType=VARCHAR},
</if>
<if
test=
"record.serialnum != null"
>
serialnum = #{record.serialnum,jdbcType=VARCHAR},
</if>
<if
test=
"record.supplier != null"
>
supplier = #{record.supplier,jdbcType=BIGINT},
</if>
<if
test=
"record.createtime != null"
>
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.creator != null"
>
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if
test=
"record.updatetime != null"
>
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updator != null"
>
updator = #{record.updator,jdbcType=BIGINT},
</if>
<if
test=
"record.tenantId != null"
>
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
<if
test=
"record.description != null"
>
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.addmonth != null"
>
addMonth = #{record.addmonth,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set id = #{record.id,jdbcType=BIGINT},
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
location = #{record.location,jdbcType=VARCHAR},
labels = #{record.labels,jdbcType=VARCHAR},
status = #{record.status,jdbcType=SMALLINT},
userID = #{record.userid,jdbcType=BIGINT},
price = #{record.price,jdbcType=DECIMAL},
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
assetnum = #{record.assetnum,jdbcType=VARCHAR},
serialnum = #{record.serialnum,jdbcType=VARCHAR},
supplier = #{record.supplier,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
updator = #{record.updator,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR},
addMonth = #{record.addmonth,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set id = #{record.id,jdbcType=BIGINT},
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
location = #{record.location,jdbcType=VARCHAR},
labels = #{record.labels,jdbcType=VARCHAR},
status = #{record.status,jdbcType=SMALLINT},
userID = #{record.userid,jdbcType=BIGINT},
price = #{record.price,jdbcType=DECIMAL},
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
assetnum = #{record.assetnum,jdbcType=VARCHAR},
serialnum = #{record.serialnum,jdbcType=VARCHAR},
supplier = #{record.supplier,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
updator = #{record.updator,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.Asset"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
<set>
<if
test=
"assetnameid != null"
>
assetnameID = #{assetnameid,jdbcType=BIGINT},
</if>
<if
test=
"location != null"
>
location = #{location,jdbcType=VARCHAR},
</if>
<if
test=
"labels != null"
>
labels = #{labels,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=SMALLINT},
</if>
<if
test=
"userid != null"
>
userID = #{userid,jdbcType=BIGINT},
</if>
<if
test=
"price != null"
>
price = #{price,jdbcType=DECIMAL},
</if>
<if
test=
"purchasedate != null"
>
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
</if>
<if
test=
"periodofvalidity != null"
>
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if
test=
"warrantydate != null"
>
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
</if>
<if
test=
"assetnum != null"
>
assetnum = #{assetnum,jdbcType=VARCHAR},
</if>
<if
test=
"serialnum != null"
>
serialnum = #{serialnum,jdbcType=VARCHAR},
</if>
<if
test=
"supplier != null"
>
supplier = #{supplier,jdbcType=BIGINT},
</if>
<if
test=
"createtime != null"
>
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if
test=
"creator != null"
>
creator = #{creator,jdbcType=BIGINT},
</if>
<if
test=
"updatetime != null"
>
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updator != null"
>
updator = #{updator,jdbcType=BIGINT},
</if>
<if
test=
"tenantId != null"
>
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=LONGVARCHAR},
</if>
<if
test=
"addmonth != null"
>
addMonth = #{addmonth,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.jsh.erp.datasource.entities.Asset"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set assetnameID = #{assetnameid,jdbcType=BIGINT},
location = #{location,jdbcType=VARCHAR},
labels = #{labels,jdbcType=VARCHAR},
status = #{status,jdbcType=SMALLINT},
userID = #{userid,jdbcType=BIGINT},
price = #{price,jdbcType=DECIMAL},
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
assetnum = #{assetnum,jdbcType=VARCHAR},
serialnum = #{serialnum,jdbcType=VARCHAR},
supplier = #{supplier,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
updatetime = #{updatetime,jdbcType=TIMESTAMP},
updator = #{updator,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
description = #{description,jdbcType=LONGVARCHAR},
addMonth = #{addmonth,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.Asset"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set assetnameID = #{assetnameid,jdbcType=BIGINT},
location = #{location,jdbcType=VARCHAR},
labels = #{labels,jdbcType=VARCHAR},
status = #{status,jdbcType=SMALLINT},
userID = #{userid,jdbcType=BIGINT},
price = #{price,jdbcType=DECIMAL},
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
assetnum = #{assetnum,jdbcType=VARCHAR},
serialnum = #{serialnum,jdbcType=VARCHAR},
supplier = #{supplier,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
updatetime = #{updatetime,jdbcType=TIMESTAMP},
updator = #{updator,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/AssetNameMapper.xml
deleted
100644 → 0
View file @
331ca3e3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.AssetNameMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.AssetName"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"assetname"
jdbcType=
"VARCHAR"
property=
"assetname"
/>
<result
column=
"assetcategoryID"
jdbcType=
"BIGINT"
property=
"assetcategoryid"
/>
<result
column=
"isystem"
jdbcType=
"SMALLINT"
property=
"isystem"
/>
<result
column=
"isconsumables"
jdbcType=
"SMALLINT"
property=
"isconsumables"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"delete_Flag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.jsh.erp.datasource.entities.AssetName"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result
column=
"description"
jdbcType=
"LONGVARCHAR"
property=
"description"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetname, assetcategoryID, isystem, isconsumables, tenant_id, delete_Flag
</sql>
<sql
id=
"Blob_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
description
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"com.jsh.erp.datasource.entities.AssetNameExample"
resultMap=
"ResultMapWithBLOBs"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from jsh_assetname
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.AssetNameExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from jsh_assetname
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"ResultMapWithBLOBs"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from jsh_assetname
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetname
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.AssetNameExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetname
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.AssetName"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetname (id, assetname, assetcategoryID,
isystem, isconsumables, tenant_id,
delete_Flag, description)
values (#{id,jdbcType=BIGINT}, #{assetname,jdbcType=VARCHAR}, #{assetcategoryid,jdbcType=BIGINT},
#{isystem,jdbcType=SMALLINT}, #{isconsumables,jdbcType=SMALLINT}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.AssetName"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetname
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"assetname != null"
>
assetname,
</if>
<if
test=
"assetcategoryid != null"
>
assetcategoryID,
</if>
<if
test=
"isystem != null"
>
isystem,
</if>
<if
test=
"isconsumables != null"
>
isconsumables,
</if>
<if
test=
"tenantId != null"
>
tenant_id,
</if>
<if
test=
"deleteFlag != null"
>
delete_Flag,
</if>
<if
test=
"description != null"
>
description,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"assetname != null"
>
#{assetname,jdbcType=VARCHAR},
</if>
<if
test=
"assetcategoryid != null"
>
#{assetcategoryid,jdbcType=BIGINT},
</if>
<if
test=
"isystem != null"
>
#{isystem,jdbcType=SMALLINT},
</if>
<if
test=
"isconsumables != null"
>
#{isconsumables,jdbcType=SMALLINT},
</if>
<if
test=
"tenantId != null"
>
#{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.AssetNameExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_assetname
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.assetname != null"
>
assetname = #{record.assetname,jdbcType=VARCHAR},
</if>
<if
test=
"record.assetcategoryid != null"
>
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
</if>
<if
test=
"record.isystem != null"
>
isystem = #{record.isystem,jdbcType=SMALLINT},
</if>
<if
test=
"record.isconsumables != null"
>
isconsumables = #{record.isconsumables,jdbcType=SMALLINT},
</if>
<if
test=
"record.tenantId != null"
>
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
<if
test=
"record.description != null"
>
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
isystem = #{record.isystem,jdbcType=SMALLINT},
isconsumables = #{record.isconsumables,jdbcType=SMALLINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
isystem = #{record.isystem,jdbcType=SMALLINT},
isconsumables = #{record.isconsumables,jdbcType=SMALLINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.AssetName"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
<set>
<if
test=
"assetname != null"
>
assetname = #{assetname,jdbcType=VARCHAR},
</if>
<if
test=
"assetcategoryid != null"
>
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
</if>
<if
test=
"isystem != null"
>
isystem = #{isystem,jdbcType=SMALLINT},
</if>
<if
test=
"isconsumables != null"
>
isconsumables = #{isconsumables,jdbcType=SMALLINT},
</if>
<if
test=
"tenantId != null"
>
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.jsh.erp.datasource.entities.AssetName"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set assetname = #{assetname,jdbcType=VARCHAR},
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
isystem = #{isystem,jdbcType=SMALLINT},
isconsumables = #{isconsumables,jdbcType=SMALLINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.AssetName"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set assetname = #{assetname,jdbcType=VARCHAR},
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
isystem = #{isystem,jdbcType=SMALLINT},
isconsumables = #{isconsumables,jdbcType=SMALLINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Prev
1
2
3
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