Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dataC_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高宇
dataC_api
Commits
e30d14f0
Commit
e30d14f0
authored
May 13, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 固定表头第一步
parent
efb26f29
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
173 additions
and
15 deletions
+173
-15
BCustomerRepository.java
...va/org/rcisoft/bus/bcustomer/dao/BCustomerRepository.java
+5
-0
BCustomerServiceImpl.java
...soft/bus/bcustomer/service/impl/BCustomerServiceImpl.java
+16
-7
BCustomerMapper.xml
...resources/mapper/bus/bcustomer/mapper/BCustomerMapper.xml
+152
-8
No files found.
src/main/java/org/rcisoft/bus/bcustomer/dao/BCustomerRepository.java
View file @
e30d14f0
...
...
@@ -25,5 +25,10 @@ public interface BCustomerRepository extends CyBaseMapper<BCustomer> {
*
*/
IPage
<
BCustomer
>
queryBCustomersPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
BCustomer
bCustomer
);
/**
* 查询跟改code相同的个数
* **/
Integer
queryNumberSomeCode
(
BCustomer
bCustomer
);
}
src/main/java/org/rcisoft/bus/bcustomer/service/impl/BCustomerServiceImpl.java
View file @
e30d14f0
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.rcisoft.core.exception.CyServiceException
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.aop.CyPageUtilAsp
;
import
org.rcisoft.core.model.CyPersistModel
;
...
...
@@ -34,13 +35,17 @@ public class BCustomerServiceImpl extends ServiceImpl<BCustomerRepository,BCusto
/**
* 保存
* 保存
* @param bCustomer
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
BCustomer
bCustomer
){
// custode 验重
if
(
baseMapper
.
queryNumberSomeCode
(
bCustomer
)
>
0
)
{
throw
new
CyServiceException
(
501
,
"该custcode已存在,请重新输入"
);
}
//增加操作
int
line
=
baseMapper
.
insert
(
bCustomer
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"新增了ID为"
+
...
...
@@ -49,7 +54,7 @@ public class BCustomerServiceImpl extends ServiceImpl<BCustomerRepository,BCusto
}
/**
* 删除
* 删除
* @param bCustomer
* @return
*/
...
...
@@ -62,7 +67,7 @@ public class BCustomerServiceImpl extends ServiceImpl<BCustomerRepository,BCusto
return
new
CyPersistModel
(
line
);
}
/**
* 逻辑删除
* 逻辑删除
* @param bCustomer
* @return
*/
...
...
@@ -76,20 +81,24 @@ public class BCustomerServiceImpl extends ServiceImpl<BCustomerRepository,BCusto
return
new
CyPersistModel
(
line
);
}
/**
* 修改
* 修改
* @param bCustomer
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
BCustomer
bCustomer
){
// custode 验重
if
(
baseMapper
.
queryNumberSomeCode
(
bCustomer
)
>
0
)
{
throw
new
CyServiceException
(
501
,
"该custcode已存在,请重新输入"
);
}
int
line
=
baseMapper
.
updateById
(
bCustomer
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
bCustomer
.
getBusinessId
()+
"的信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 根据id查询
* 根据id查询
* @param id
* @return
*/
...
...
@@ -99,7 +108,7 @@ public class BCustomerServiceImpl extends ServiceImpl<BCustomerRepository,BCusto
}
/**
* 分页查询
* 分页查询
* @param bCustomer
* @return
*/
...
...
@@ -110,7 +119,7 @@ public class BCustomerServiceImpl extends ServiceImpl<BCustomerRepository,BCusto
}
/**
* 查询list
* 查询list
* @param bCustomer
* @return
*/
...
...
src/main/resources/mapper/bus/bcustomer/mapper/BCustomerMapper.xml
View file @
e30d14f0
...
...
@@ -39,18 +39,162 @@
<select
id=
"queryBCustomers"
resultMap=
"BaseResultMap"
>
select * from b_customer
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<if
test=
"entity.custCode != null and entity.custCode != ''"
>
and cust_code like concat('%',#{entity.custCode},'%')
</if>
<if
test=
"entity.custName != null and entity.custName != ''"
>
and cust_name like concat('%',#{entity.custName },'%')
</if>
<if
test=
"entity.custGroup != null and entity.custGroup != ''"
>
and cust_group like concat('%',#{entity.custGroup},'%')
</if>
<if
test=
"entity.custGroup2 != null and entity.custGroup2 != ''"
>
and cust_group2 like concat('%',#{entity.custGroup2 },'%')
</if>
<if
test=
"entity.custRt1 != null and entity.custRt1 != ''"
>
and cust_rt1 like concat('%',#{entity.custRt1},'%')
</if>
<if
test=
"entity.custIo != null and entity.custIo != ''"
>
and cust_io = #{entity.custIo}
</if>
<if
test=
"entity.custNewpic != null and entity.custNewpic != ''"
>
and cust_newpic like concat('%',#{entity.custNewpic},'%')
</if>
<if
test=
"entity.custGroup1 != null and entity.custGroup1 != ''"
>
and cust_group1 like concat('%',#{entity.custGroup1},'%')
</if>
<if
test=
"entity.custRt2 != null and entity.custRt2 != ''"
>
and cust_rt2 like concat('%',#{ entity.custRt2 },'%')
</if>
<if
test=
"entity.custRout != null and entity.custRout != ''"
>
and cust_rout like concat('%',#{entity.custRout},'%')
</if>
<if
test=
"entity.custAddr != null and entity.custAddr != ''"
>
and cust_addr like concat('%',#{entity.custAddr},'%')
</if>
<if
test=
"entity.custG0 != null and entity.custG0 != ''"
>
and cust_g0 like concat('%',#{entity.custG0 },'%')
</if>
<if
test=
"entity.custG20 != null and entity.custG20 != ''"
>
and cust_g20 like concat('%',#{entity.custG20},'%')
</if>
<if
test=
"entity.custG30 != null and entity.custG30 != ''"
>
and cust_g30 like concat('%', #{entity.custG30},'%')
</if>
<if
test=
"entity.custG201 != null and entity.custG201 != ''"
>
and cust_g201 like concat('%', #{entity.custG201 },'%')
</if>
<if
test=
"entity.custSave != null and entity.custSave != '' "
>
and cust_save like concat('%',#{entity.custSave},'%')
</if>
<if
test=
"entity.custStype != null and entity.custStype != '' "
>
and cust_stype like concat('%',#{entity.custStype},'%')
</if>
<if
test=
"entity.custG1 != null and entity.custG1 != ''"
>
and cust_g1 like concat('%',#{entity.custG1},'%')
</if>
<if
test=
"entity.custYj != null and entity.custYj != ''"
>
and cust_yj like concat('%',#{entity.custYj},'%')
</if>
<if
test=
"entity.custYj2 != null and entity.custYj2 != ''"
>
and cust_yj2 like concat('%',#{entity.custYj2},'%')
</if>
<if
test=
"entity.custYj3 !=null and entity.custYj3 !=''"
>
and cust_yj3 like concat('%',#{entity.custYj3},'%')
</if>
<if
test=
"entity.custGc !=null and entity.custGc != ''"
>
and cust_gc like concat('%',#{entity.custGc},'%')
</if>
</select>
<select
id=
"queryBCustomersPaged"
resultMap=
"BaseResultMap"
>
select * from b_customer
where 1=1
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
and del_flag = '0'
<if
test=
"entity.flag !=null and entity.flag != '' "
>
and flag = #{entity.flag}
</if>
<if
test=
"entity.custCode != null and entity.custCode != ''"
>
and cust_code like concat('%',#{entity.custCode},'%')
</if>
<if
test=
"entity.custName != null and entity.custName != ''"
>
and cust_name like concat('%',#{entity.custName },'%')
</if>
<if
test=
"entity.custGroup != null and entity.custGroup != ''"
>
and cust_group like concat('%',#{entity.custGroup},'%')
</if>
<if
test=
"entity.custGroup2 != null and entity.custGroup2 != ''"
>
and cust_group2 like concat('%',#{entity.custGroup2 },'%')
</if>
<if
test=
"entity.custRt1 != null and entity.custRt1 != ''"
>
and cust_rt1 like concat('%',#{entity.custRt1},'%')
</if>
<if
test=
"entity.custIo != null and entity.custIo != ''"
>
and cust_io = #{entity.custIo}
</if>
<if
test=
"entity.custNewpic != null and entity.custNewpic != ''"
>
and cust_newpic like concat('%',#{entity.custNewpic},'%')
</if>
<if
test=
"entity.custGroup1 != null and entity.custGroup1 != ''"
>
and cust_group1 like concat('%',#{entity.custGroup1},'%')
</if>
<if
test=
"entity.custRt2 != null and entity.custRt2 != ''"
>
and cust_rt2 like concat('%',#{ entity.custRt2 },'%')
</if>
<if
test=
"entity.custRout != null and entity.custRout != ''"
>
and cust_rout like concat('%',#{entity.custRout},'%')
</if>
<if
test=
"entity.custAddr != null and entity.custAddr != ''"
>
and cust_addr like concat('%',#{entity.custAddr},'%')
</if>
<if
test=
"entity.custG0 != null and entity.custG0 != ''"
>
and cust_g0 like concat('%',#{entity.custG0 },'%')
</if>
<if
test=
"entity.custG20 != null and entity.custG20 != ''"
>
and cust_g20 like concat('%',#{entity.custG20},'%')
</if>
<if
test=
"entity.custG30 != null and entity.custG30 != ''"
>
and cust_g30 like concat('%', #{entity.custG30},'%')
</if>
<if
test=
"entity.custG201 != null and entity.custG201 != ''"
>
and cust_g201 like concat('%', #{entity.custG201 },'%')
</if>
<if
test=
"entity.custSave != null and entity.custSave != '' "
>
and cust_save like concat('%',#{entity.custSave},'%')
</if>
<if
test=
"entity.custStype != null and entity.custStype != '' "
>
and cust_stype like concat('%',#{entity.custStype},'%')
</if>
<if
test=
"entity.custG1 != null and entity.custG1 != ''"
>
and cust_g1 like concat('%',#{entity.custG1},'%')
</if>
<if
test=
"entity.custYj != null and entity.custYj != ''"
>
and cust_yj like concat('%',#{entity.custYj},'%')
</if>
<if
test=
"entity.custYj2 != null and entity.custYj2 != ''"
>
and cust_yj2 like concat('%',#{entity.custYj2},'%')
</if>
<if
test=
"entity.custYj3 !=null and entity.custYj3 !=''"
>
and cust_yj3 like concat('%',#{entity.custYj3},'%')
</if>
<if
test=
"entity.custGc !=null and entity.custGc != ''"
>
and cust_gc like concat('%',#{entity.custGc},'%')
</if>
</select>
<select
id=
"queryNumberSomeCode"
resultType=
"java.lang.Integer"
>
select
count(*)
from
b_customer cust
where
del_flag = '0'
and cust.cust_code = #{custCode}
<if
test=
"businessId != null and businessId != ''"
>
and cust.business_id != #{businessId}
</if>
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment