Commit c80ceee0 authored by fangxinjiang's avatar fangxinjiang

派单自定义提示优化

parent b574951c
...@@ -139,8 +139,8 @@ public class TEmpChangeInfoController { ...@@ -139,8 +139,8 @@ public class TEmpChangeInfoController {
@Operation(summary = "获取所有项目名称", description = "获取所有项目名称") @Operation(summary = "获取所有项目名称", description = "获取所有项目名称")
@SysLog("获取所有项目名称" ) @SysLog("获取所有项目名称" )
@GetMapping("/getAllDept" ) @GetMapping("/getAllDept" )
public R<List<TSettleDomain>> getAllDept() { public R<List<TSettleDomain>> getAllDept(@RequestParam(required = false,name = "customerName") String customerName) {
return tEmpChangeInfoService.getAllDept(); return tEmpChangeInfoService.getAllDept(customerName);
} }
/** /**
...@@ -152,8 +152,8 @@ public class TEmpChangeInfoController { ...@@ -152,8 +152,8 @@ public class TEmpChangeInfoController {
@Operation(summary = "获取所有单位名称", description = "获取所有单位名称") @Operation(summary = "获取所有单位名称", description = "获取所有单位名称")
@SysLog("获取所有单位名称" ) @SysLog("获取所有单位名称" )
@GetMapping("/getAllUint" ) @GetMapping("/getAllUint" )
public R<List<TCustomerInfo>> getAllUint() { public R<List<TCustomerInfo>> getAllUint(@RequestParam(required = false,name = "customerName") String customerName) {
return tEmpChangeInfoService.getAllUint(); return tEmpChangeInfoService.getAllUint(customerName);
} }
/** /**
......
...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper; ...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -32,5 +33,5 @@ import java.util.List; ...@@ -32,5 +33,5 @@ import java.util.List;
@Mapper @Mapper
public interface TCustomerInfoMapper extends BaseMapper<TCustomerInfo> { public interface TCustomerInfoMapper extends BaseMapper<TCustomerInfo> {
List<TCustomerInfo> getAllUnit(); List<TCustomerInfo> getAllUnit(@Param("customerName") String customerName);
} }
...@@ -30,5 +30,5 @@ import java.util.List; ...@@ -30,5 +30,5 @@ import java.util.List;
*/ */
public interface TCustomerInfoService extends IService<TCustomerInfo> { public interface TCustomerInfoService extends IService<TCustomerInfo> {
List<TCustomerInfo> getAllUnit(); List<TCustomerInfo> getAllUnit(String customerName);
} }
...@@ -57,16 +57,18 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> { ...@@ -57,16 +57,18 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @Date 2022-06-22
* @param customerName
*/ */
R<List<TSettleDomain>> getAllDept(); R<List<TSettleDomain>> getAllDept(String customerName);
/** /**
* 获取所有单位名称 * 获取所有单位名称
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @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); IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId);
} }
...@@ -34,7 +34,7 @@ import java.util.List; ...@@ -34,7 +34,7 @@ import java.util.List;
public class TCustomerInfoServiceImpl extends ServiceImpl<TCustomerInfoMapper, TCustomerInfo> implements TCustomerInfoService { public class TCustomerInfoServiceImpl extends ServiceImpl<TCustomerInfoMapper, TCustomerInfo> implements TCustomerInfoService {
@Override @Override
public List<TCustomerInfo> getAllUnit() { public List<TCustomerInfo> getAllUnit(String customerName) {
return baseMapper.getAllUnit(); return baseMapper.getAllUnit(customerName);
} }
} }
...@@ -276,11 +276,18 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -276,11 +276,18 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @Date 2022-06-22
* @param customerName
*/ */
@Override @Override
public R<List<TSettleDomain>> getAllDept() { public R<List<TSettleDomain>> getAllDept(String customerName) {
List<TSettleDomain> list = tSettleDomainMapper.selectList(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL) List<TSettleDomain> list = null;
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL)); 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); return R.ok(list);
} }
...@@ -289,11 +296,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -289,11 +296,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @return R * @return R
* @Author huyc * @Author huyc
* @Date 2022-06-22 * @Date 2022-06-22
* @param customerName
*/ */
@Override @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.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); return R.ok(list);
} }
......
...@@ -62,6 +62,13 @@ ...@@ -62,6 +62,13 @@
</resultMap> </resultMap>
<select id="getAllUnit" resultMap="tCustomerInfoMap"> <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> </select>
</mapper> </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