Commit 5544ec9a authored by fangxinjiang's avatar fangxinjiang

派单自定义提示优化

parent c9f567fd
......@@ -139,8 +139,8 @@ public class TEmpChangeInfoController {
@Operation(summary = "获取所有项目名称", description = "获取所有项目名称")
@SysLog("获取所有项目名称" )
@GetMapping("/getAllDept" )
public R<List<TSettleDomain>> getAllDept() {
return tEmpChangeInfoService.getAllDept();
public R<List<TSettleDomain>> getAllDept(@RequestParam(required = false,name = "customerName") String customerName) {
return tEmpChangeInfoService.getAllDept(customerName);
}
/**
......@@ -152,8 +152,8 @@ public class TEmpChangeInfoController {
@Operation(summary = "获取所有单位名称", description = "获取所有单位名称")
@SysLog("获取所有单位名称" )
@GetMapping("/getAllUint" )
public R<List<TCustomerInfo>> getAllUint() {
return tEmpChangeInfoService.getAllUint();
public R<List<TCustomerInfo>> getAllUint(@RequestParam(required = false,name = "customerName") String customerName) {
return tEmpChangeInfoService.getAllUint(customerName);
}
/**
......
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -32,5 +33,5 @@ import java.util.List;
@Mapper
public interface TCustomerInfoMapper extends BaseMapper<TCustomerInfo> {
List<TCustomerInfo> getAllUnit();
List<TCustomerInfo> getAllUnit(@Param("customerName") String customerName);
}
......@@ -30,5 +30,5 @@ import java.util.List;
*/
public interface TCustomerInfoService extends IService<TCustomerInfo> {
List<TCustomerInfo> getAllUnit();
List<TCustomerInfo> getAllUnit(String customerName);
}
......@@ -57,16 +57,18 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
* @return R
* @Author huyc
* @Date 2022-06-22
* @param customerName
*/
R<List<TSettleDomain>> getAllDept();
R<List<TSettleDomain>> getAllDept(String customerName);
/**
* 获取所有单位名称
* @return R
* @Author huyc
* @Date 2022-06-22
* @param customerName
*/
R<List<TCustomerInfo>> getAllUint();
R<List<TCustomerInfo>> getAllUint(String customerName);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId);
}
......@@ -34,7 +34,7 @@ import java.util.List;
public class TCustomerInfoServiceImpl extends ServiceImpl<TCustomerInfoMapper, TCustomerInfo> implements TCustomerInfoService {
@Override
public List<TCustomerInfo> getAllUnit() {
return baseMapper.getAllUnit();
public List<TCustomerInfo> getAllUnit(String customerName) {
return baseMapper.getAllUnit(customerName);
}
}
......@@ -276,11 +276,18 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @return R
* @Author huyc
* @Date 2022-06-22
* @param customerName
*/
@Override
public R<List<TSettleDomain>> getAllDept() {
List<TSettleDomain> list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL));
public R<List<TSettleDomain>> getAllDept(String customerName) {
List<TSettleDomain> list = null;
if (Common.isNotNull(customerName)){
list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL).eq(TSettleDomain::getCustomerName,customerName));
}else {
list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL));
}
return R.ok(list);
}
......@@ -289,11 +296,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @return R
* @Author huyc
* @Date 2022-06-22
* @param customerName
*/
@Override
public R<List<TCustomerInfo>> getAllUint() {
public R<List<TCustomerInfo>> getAllUint(String customerName) {
//List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
List<TCustomerInfo> list = tCustomerInfoService.getAllUnit();
List<TCustomerInfo> list = tCustomerInfoService.getAllUnit(customerName);
return R.ok(list);
}
......
......@@ -62,6 +62,13 @@
</resultMap>
<select id="getAllUnit" resultMap="tCustomerInfoMap">
select a.CUSTOMER_ID AS "ID",a.CUSTOMER_NAME AS "CUSTOMER_NAME",a.CUSTOMER_NO AS "CUSTOMER_CODE" from t_settle_domain a GROUP BY A.CUSTOMER_NO
select a.CUSTOMER_ID AS "ID",a.CUSTOMER_NAME AS "CUSTOMER_NAME",a.CUSTOMER_NO AS "CUSTOMER_CODE" from t_settle_domain a
<where>
1=1
<if test="customerName != null and customerName != null">
and a.CUSTOMER_NAME like concat(#{customerName},'%')
</if>
</where>
GROUP BY A.CUSTOMER_NO
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment