diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehmodelconfig/BaseVehmodelConfigService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehmodelconfig/BaseVehmodelConfigService.java index a45ea81fee..5e1c885c98 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehmodelconfig/BaseVehmodelConfigService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehmodelconfig/BaseVehmodelConfigService.java @@ -474,6 +474,9 @@ public class BaseVehmodelConfigService extends MybatisBaseService getListByConfigSidAndUseOrgSid(String configSid, String createOrgSId) { - return baseMapper.getListByConfigSidAndUseOrgSid(configSid,createOrgSId); + return baseMapper.getListByConfigSidAndUseOrgSid(configSid, createOrgSId); } } \ No newline at end of file diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busmaindeposit/BusMainDepositService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busmaindeposit/BusMainDepositService.java index a3619a0e9b..4086e9e1b0 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busmaindeposit/BusMainDepositService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busmaindeposit/BusMainDepositService.java @@ -1617,11 +1617,11 @@ public class BusMainDepositService extends MybatisBaseService page = PagerUtil.queryToPage(pagerQuery); IPage pagging = baseMapper.pageAppList(page, qw, query.getName()); List list = pagging.getRecords(); - list.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + list.removeAll(Collections.singleton(null)); if (!list.isEmpty()) { for (AppBusMainDepositOrderVo vo : list) { List voList = vo.getModelList(); - voList.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + voList.removeAll(Collections.singleton(null)); if (!voList.isEmpty()) { for (AppDepositModelListVo v : voList) { String modelSid = v.getModelSid(); diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java index 64a4907ace..2953326276 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java @@ -113,7 +113,6 @@ import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.util.*; -import java.util.stream.Collectors; /** * Project: anrui-buscenter(业务管理)
@@ -1394,7 +1393,7 @@ public class BusSalesOrderService extends MybatisBaseService nowCarList = busSalesOrderVehicleService.selectAppDetailsVoBySaleOrderSid(saleOrderSid); - nowCarList.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + nowCarList.removeAll(Collections.singleton(null)); if (!nowCarList.isEmpty()) { orderInfo.setNowCarList(nowCarList); boolean isCheck = isCheck(vinNoList, nowCarList); @@ -1406,7 +1405,7 @@ public class BusSalesOrderService extends MybatisBaseService appReadyCarList = busSalesVehicleOrderService.selectAppDetailsVoBySaleOrderSid(saleOrderSid); - appReadyCarList.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + appReadyCarList.removeAll(Collections.singleton(null)); if (!appReadyCarList.isEmpty()) { for (AppReadyCarListVo v : appReadyCarList) { if (appCarInfo.getReadyCar().size() > 0) { @@ -1506,33 +1505,39 @@ public class BusSalesOrderService extends MybatisBaseService appReadyCarLists = new ArrayList<>(); //根据车型及配置查询车型信息 ResultBean appCarConfigSummaryVoResultBean = baseVehmodelConfigFeign.selectCarConfigSummary(modelSid, configSid, userSid); - AppCarConfigSummaryVo data = appCarConfigSummaryVoResultBean.getData(); - //车型sid - orderInfo.setModelSid(modelSid); - //车型名称 - orderInfo.setModelName(data.getModel()); - //配置sid - orderInfo.setConfigSid(configSid); - //车型配置 - orderInfo.setCommonlyConfig(data.getConfig()); - //更多配置 - orderInfo.setMoreConfig(data.getMoreConfig()); - //特殊说明:若为意向车型则为意向车型的特殊说明 - orderInfo.setSpecialInstructions(special); - //订单选择的现车列表 - orderInfo.setNowCarList(appNowCarLists); - //订单选择的采购订单列表 - orderInfo.setReadyCarList(appReadyCarLists); - vo.setPrice(data.getPrice()); + if (appCarConfigSummaryVoResultBean.getSuccess()) { + AppCarConfigSummaryVo data = appCarConfigSummaryVoResultBean.getData(); + //车型sid + orderInfo.setModelSid(modelSid); + //车型名称 + orderInfo.setModelName(data.getModel()); + //配置sid + orderInfo.setConfigSid(configSid); + //车型配置 + orderInfo.setCommonlyConfig(data.getConfig()); + //更多配置 + orderInfo.setMoreConfig(data.getMoreConfig()); + //特殊说明:若为意向车型则为意向车型的特殊说明 + orderInfo.setSpecialInstructions(special); + //订单选择的现车列表 + orderInfo.setNowCarList(appNowCarLists); + //订单选择的采购订单列表 + orderInfo.setReadyCarList(appReadyCarLists); + vo.setPrice(data.getPrice()); + } + vo.setOrderInfo(orderInfo); //查询该车型下的现车列表 ResultBean> orderVoResultBean = baseVehicleFeign.selectAppList(modelSid, configSid); if (orderVoResultBean.getSuccess()) { List voList = orderVoResultBean.getData(); - for (AppBaseVehicleOrderVo vehicleOrderVo : voList) { - AppNowCarVo appNowCarVo = new AppNowCarVo(); - BeanUtil.copyProperties(vehicleOrderVo, appNowCarVo); - appNowCars.add(appNowCarVo); + voList.removeAll(Collections.singleton(null)); + if (!voList.isEmpty()) { + for (AppBaseVehicleOrderVo vehicleOrderVo : voList) { + AppNowCarVo appNowCarVo = new AppNowCarVo(); + BeanUtil.copyProperties(vehicleOrderVo, appNowCarVo); + appNowCars.add(appNowCarVo); + } } appCarInfo.setNowCar(appNowCars); } @@ -1540,26 +1545,29 @@ public class BusSalesOrderService extends MybatisBaseService> applyListResultBean = busVehicleApplyDetailFeign.getAppApplyList(modelSid, configSid); if (applyListResultBean.getSuccess()) { List applyListVos = applyListResultBean.getData(); - for (AppBusVehicleApplyListVo applyListVo : applyListVos) { - //采购订单信息 - AppReadyCarVo appReadyCarVo = new AppReadyCarVo(); - BeanUtil.copyProperties(applyListVo, appReadyCarVo); - if (StringUtils.isNotBlank(applyListVo.getTotalNum())) { - //总数量 - int totalNum = Integer.parseInt(applyListVo.getTotalNum()); - if (StringUtils.isNotBlank(applyListVo.getLockingNum())) { - //锁定数量 - int lockNum = Integer.parseInt(applyListVo.getLockingNum()); - //可使用数量 - int canUseNum = totalNum - lockNum; - appReadyCarVo.setCanUseNum(String.valueOf(canUseNum)); + applyListVos.removeAll(Collections.singleton(null)); + if (!applyListVos.isEmpty()) { + for (AppBusVehicleApplyListVo applyListVo : applyListVos) { + //采购订单信息 + AppReadyCarVo appReadyCarVo = new AppReadyCarVo(); + BeanUtil.copyProperties(applyListVo, appReadyCarVo); + if (StringUtils.isNotBlank(applyListVo.getTotalNum())) { + //总数量 + int totalNum = Integer.parseInt(applyListVo.getTotalNum()); + if (StringUtils.isNotBlank(applyListVo.getLockingNum())) { + //锁定数量 + int lockNum = Integer.parseInt(applyListVo.getLockingNum()); + //可使用数量 + int canUseNum = totalNum - lockNum; + appReadyCarVo.setCanUseNum(String.valueOf(canUseNum)); + } else { + appReadyCarVo.setCanUseNum(String.valueOf(totalNum)); + } } else { - appReadyCarVo.setCanUseNum(String.valueOf(totalNum)); + appReadyCarVo.setCanUseNum("0"); } - } else { - appReadyCarVo.setCanUseNum("0"); + appReadyCar.add(appReadyCarVo); } - appReadyCar.add(appReadyCarVo); } appCarInfo.setReadyCar(appReadyCar); } @@ -1884,7 +1892,7 @@ public class BusSalesOrderService extends MybatisBaseService list = busDepositFictitiousService.detailsList(busSalesOrderDepositDetailsVo.getSid()); - list.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + list.removeAll(Collections.singleton(null)); if (list.isEmpty()) { isDeposit = false; } @@ -1918,7 +1926,7 @@ public class BusSalesOrderService extends MybatisBaseService nowCarList = busSalesOrderVehicleService.selectAppDetailsVoBySaleOrderSid(sid); - nowCarList.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + nowCarList.removeAll(Collections.singleton(null)); if (!nowCarList.isEmpty()) { boolean isCheck = isCheck(vinNoList, nowCarList); if (isCheck) { @@ -1979,7 +1987,7 @@ public class BusSalesOrderService extends MybatisBaseService appReadyCarList = busSalesVehicleOrderService.selectAppDetailsVoBySaleOrderSid(sid); - appReadyCarList.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + appReadyCarList.removeAll(Collections.singleton(null)); if (!appReadyCarList.isEmpty()) { //验证所选采购订单的车辆是否发生了变化 boolean isCheck = isCheck2(map, appReadyCarList); @@ -2047,19 +2055,19 @@ public class BusSalesOrderService extends MybatisBaseService vinList = busSalesOrderVehicleService.selectList(sid); - modelInfo.setVinList(vinList); - } else { - if ("1".equals(modelInfo.getType())) { - //查询采购订单编号 - List stringList = busSalesVehicleOrderService.selectList(sid); - modelInfo.setOrderList(stringList); - } - } if (modelInfo != null) { + //若订单类型为0则为现车,为1采购订单,为2排产 + if ("0".equals(modelInfo.getType())) { + //查询车架号 + List vinList = busSalesOrderVehicleService.selectList(sid); + modelInfo.setVinList(vinList); + } else { + if ("1".equals(modelInfo.getType())) { + //查询采购订单编号 + List stringList = busSalesVehicleOrderService.selectList(sid); + modelInfo.setOrderList(stringList); + } + } vo.setModelInfo(modelInfo); } @@ -2083,7 +2091,7 @@ public class BusSalesOrderService extends MybatisBaseService discountList = busSalesOrderDiscountService.selectDiscount(sid); - discountList.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + discountList.removeAll(Collections.singleton(null)); if (!discountList.isEmpty()) { vo.setDiscountList(discountList); } @@ -2093,7 +2101,7 @@ public class BusSalesOrderService extends MybatisBaseService list = busDepositFictitiousService.detailsList(depositInfo.getSid()); - list.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + list.removeAll(Collections.singleton(null)); if (!list.isEmpty()) { for (BusDepositFictitiousDetailsVo v : list) { String b = "编号为" + v.getDepositBillNo() + "虚拟订单订金转入" + v.getPrice() + "元,"; diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdeposit/BusSalesOrderDepositService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdeposit/BusSalesOrderDepositService.java index 6c869a23e7..8bc05c1d7d 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdeposit/BusSalesOrderDepositService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdeposit/BusSalesOrderDepositService.java @@ -56,6 +56,7 @@ import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -143,7 +144,7 @@ public class BusSalesOrderDepositService extends MybatisBaseService listVos = busDepositFictitiousService.getList(vo.getSid()); - listVos.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + listVos.removeAll(Collections.singleton(null)); if (!listVos.isEmpty()) { for (AppBusSalesOrderDepositListVo listVo : listVos) { String payPath = listVo.getPayPath(); @@ -191,14 +192,14 @@ public class BusSalesOrderDepositService extends MybatisBaseService list = busDepositFictitiousService.getList(depositSid); - list.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + list.removeAll(Collections.singleton(null)); if (list.size() > 0) { busDepositFictitiousService.deleteByDepositSid(depositSid); } //若缴纳方式为订金结转 if ("02".equals(dto.getDepositTypeKey())) { List listVos = dto.getVirtualOrderList(); - listVos.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + listVos.removeAll(Collections.singleton(null)); for (AppBusSalesOrderDepositListDto listDto : listVos) { //查询付款人是否和客户一样 BusDeposit busDeposit = busDepositService.selectByBillSid(listDto.getDepositBillSid()); @@ -224,7 +225,7 @@ public class BusSalesOrderDepositService extends MybatisBaseService page = PagerUtil.queryToPage(pagerQuery); IPage pagging = baseMapper.getDepositList(page, qw, query.getName()); List list = pagging.getRecords(); - list.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + list.removeAll(Collections.singleton(null)); if (!list.isEmpty()) { for (AppDepositListVo vo : list) { String deposit = vo.getDeposit(); diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdiscount/BusSalesOrderDiscountService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdiscount/BusSalesOrderDiscountService.java index d97890c105..6a70bc3895 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdiscount/BusSalesOrderDiscountService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdiscount/BusSalesOrderDiscountService.java @@ -43,9 +43,8 @@ import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Collections; import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; /** * Project: anrui-buscenter(业务管理)
@@ -106,7 +105,7 @@ public class BusSalesOrderDiscountService extends MybatisBaseService> getDiscountList(String sid) { ResultBean> rb = ResultBean.fireFail(); List list = baseMapper.getDiscountList(sid); - list.parallelStream().filter(Objects::nonNull).collect(Collectors.toList()); + list.removeAll(Collections.singleton(null)); if (!list.isEmpty()) { for (AppBusSalesOrderDiscountListVo discountListVo : list) { if (StringUtils.isNotBlank(discountListVo.getDiscountExplain())) { diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeign.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeign.java index 3642ca921e..2bd3601189 100644 --- a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeign.java +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeign.java @@ -1,5 +1,7 @@ package com.yxt.anrui.portal.api.sysstaffinfo; +import com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffQuery; +import com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffVo; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; @@ -92,7 +94,7 @@ public interface SysStaffinfoFeign { */ @ApiOperation("获取集团内全部员工姓名") @GetMapping("/getStaffName") - public ResultBean>> getStaffName(@RequestParam(value = "staffName", required = false) String staffName); + public ResultBean>> getStaffName(@RequestParam(value = "staffName", required = false) String staffName); /** * 获取部门内全部员工姓名 @@ -102,7 +104,7 @@ public interface SysStaffinfoFeign { */ @ApiOperation("获取部门内全部员工姓名") @GetMapping("/getStaffNameByDeptSid") - public ResultBean>> getStaffNameByDeptSid(@RequestParam(value = "staffName", required = false) String staffName,@RequestParam(value = "deptSid") String deptSid); + public ResultBean>> getStaffNameByDeptSid(@RequestParam(value = "staffName", required = false) String staffName, @RequestParam(value = "deptSid") String deptSid); @ApiOperation("获取App通讯录") @@ -125,5 +127,10 @@ public interface SysStaffinfoFeign { @GetMapping("/selectStaffList") ResultBean> selectStaffList(@SpringQueryMap PcSysStaffQuery pcSysStaffQuery); + @ApiOperation("移动端-销售订单-内部推荐人下拉框") + @ResponseBody + @GetMapping("/getUserList") + ResultBean> getUserList(@RequestBody PagerQuery pagerQuery); + } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeignFallback.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeignFallback.java index cfa7bf12a2..0f5f16a316 100644 --- a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeignFallback.java +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/SysStaffinfoFeignFallback.java @@ -1,5 +1,7 @@ package com.yxt.anrui.portal.api.sysstaffinfo; +import com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffQuery; +import com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffVo; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; @@ -81,4 +83,9 @@ public class SysStaffinfoFeignFallback implements SysStaffinfoFeign { return null; } + @Override + public ResultBean> getUserList(PagerQuery pagerQuery) { + return null; + } + } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/app/AppSysStaffQuery.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/app/AppSysStaffQuery.java new file mode 100644 index 0000000000..1c862355f5 --- /dev/null +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/app/AppSysStaffQuery.java @@ -0,0 +1,19 @@ +package com.yxt.anrui.portal.api.sysstaffinfo.app; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/6/11 9:44 + * @Description + */ +@Data +public class AppSysStaffQuery implements Query { + private static final long serialVersionUID = 4724669786231817593L; + @ApiModelProperty(value = "用户名称") + private String name; + @ApiModelProperty(value = "用户sid") + private String userSid; +} diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/app/AppSysStaffVo.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/app/AppSysStaffVo.java new file mode 100644 index 0000000000..e89710734b --- /dev/null +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysstaffinfo/app/AppSysStaffVo.java @@ -0,0 +1,30 @@ +package com.yxt.anrui.portal.api.sysstaffinfo.app; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author dimengzhe + * @Date 2022/6/11 9:29 + * @Description + */ +@Data +public class AppSysStaffVo implements Vo { + private static final long serialVersionUID = -4051562700421770402L; + @ApiModelProperty(value = "用户sid") + private String userSid; + @ApiModelProperty(value = "用户名称") + private String userName; + @ApiModelProperty(value = "头像") + private String userImage; + @ApiModelProperty(value = "电话") + private String userMobile; + @ApiModelProperty(value = "部门") + private String department; + @ApiModelProperty(value = "岗位") + private String position; + + @ApiModelProperty(value = "头像:后端内部使用") + private String headImage; +} diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoMapper.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoMapper.java index 071f15e137..fe00365070 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoMapper.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoMapper.java @@ -1,11 +1,13 @@ package com.yxt.anrui.portal.biz.sysstaffinfo; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.yxt.anrui.portal.api.sysorganization.AppContactSysOrganizationVo; import com.yxt.anrui.portal.api.sysstaffinfo.*; +import com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -103,10 +105,11 @@ public interface SysStaffinfoMapper extends BaseMapper { * @return */ int updateBySid(@Param("personType") String personType, @Param("personTypeKey") String personTypeKey, - @Param("sid") String sid, @Param("date") Date date, @Param("reason") String reason); + @Param("sid") String sid, @Param("date") Date date, @Param("reason") String reason); /** * 查询当前分公司下的员工信息 + * * @param orgSid 分公司sid * @return */ @@ -115,4 +118,6 @@ public interface SysStaffinfoMapper extends BaseMapper { List> getStaffName(@Param(Constants.WRAPPER) Wrapper> qw); List> getStaffNameByDeptSid(@Param(Constants.WRAPPER) Wrapper> qw); + + IPage getUserList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw, @Param("orgSid") String orgSid); } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoMapper.xml b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoMapper.xml index 458695d9ed..2fca3b22f7 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoMapper.xml +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoMapper.xml @@ -8,22 +8,22 @@ resultType="com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoAppContactsVo"> SELECT staff.sid, staff.name, staff.mobile, staff.pinYinName, staff.firstPinYinLabel, user.headImage FROM sys_staffinfo staff - LEFT JOIN sys_user user - ON staff.sid = user.staffSid + LEFT JOIN sys_user user + ON staff.sid = user.staffSid ORDER BY staff.firstPinYinLabel = '#', staff.firstPinYinLabel ASC, staff.pinYinName @@ -66,16 +66,17 @@ IFNULL(NULL, '3') AS type, IFNULL(NULL, 0) AS staffNum FROM sys_staff_org org - INNER JOIN sys_staffinfo staff ON org.staffSid = staff.sid - LEFT JOIN sys_user user - ON staff.sid = user.staffSid + INNER JOIN sys_staffinfo staff ON org.staffSid = staff.sid + LEFT JOIN sys_user user + ON staff.sid = user.staffSid WHERE org.orgSid = #{sid} select sso.staffSid, si.name staffName from sys_staff_org sso - left join sys_staffinfo si on sso.staffSid = si.sid + left join sys_staffinfo si on sso.staffSid = si.sid where find_in_set(#{orgSid}, replace(sso.orgSidPath, '/', ',')) @@ -311,13 +320,34 @@ + + \ No newline at end of file diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoRest.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoRest.java index 2e52daf5ae..8a49e5f08d 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoRest.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoRest.java @@ -2,6 +2,8 @@ package com.yxt.anrui.portal.biz.sysstaffinfo; import com.baomidou.mybatisplus.core.metadata.IPage; import com.yxt.anrui.portal.api.sysstaffinfo.*; +import com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffQuery; +import com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffVo; import com.yxt.anrui.portal.biz.sysuser.SysUserService; import com.yxt.common.base.config.component.FileUploadComponent; import com.yxt.common.base.utils.PagerUtil; @@ -142,7 +144,7 @@ public class SysStaffinfoRest implements SysStaffinfoFeign { @Override public ResultBean>> getStaffNameByDeptSid(String staffName, String deptSid) { ResultBean rb = ResultBean.fireFail(); - List> staffNameList = sysStaffinfoService.getStaffNameByDeptSid(staffName,deptSid); + List> staffNameList = sysStaffinfoService.getStaffNameByDeptSid(staffName, deptSid); return rb.success().setData(staffNameList); } @@ -185,5 +187,12 @@ public class SysStaffinfoRest implements SysStaffinfoFeign { return sysStaffinfoService.selectStaffList(pcSysStaffQuery); } + @Override + public ResultBean> getUserList(PagerQuery pagerQuery) { + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = sysStaffinfoService.getUserList(pagerQuery); + return rb.success().setData(pv); + } + } diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoService.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoService.java index 5d17c245d5..a95f7e3509 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoService.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoService.java @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.yxt.anrui.portal.api.sysorganization.AppContactSysOrganizationVo; import com.yxt.anrui.portal.api.sysorganization.SysOrganization; import com.yxt.anrui.portal.api.sysstaffinfo.*; +import com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffQuery; +import com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffVo; import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgDetailsVo; import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgDto; @@ -25,12 +27,14 @@ import com.yxt.common.base.utils.PagerUtil; import com.yxt.common.base.utils.PinYinUtils; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.text.SimpleDateFormat; import java.util.*; +import java.util.stream.Collectors; /** * Project: anrui_portal(门户建设)
@@ -223,7 +227,7 @@ public class SysStaffinfoService extends MybatisBaseService getUserList(PagerQuery pagerQuery) { + IPage page = PagerUtil.queryToPage(pagerQuery); + AppSysStaffQuery params = pagerQuery.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + String orgSid = ""; + if (params != null) { + if (StringUtils.isNotBlank(params.getUserSid())) { + ResultBean stringResultBean = sysStaffOrgService.getPathSidByUserSid(params.getUserSid()); + if (stringResultBean.getSuccess()) { + orgSid = stringResultBean.getData(); + } + } + if (StringUtils.isNotBlank(params.getName())) { + + } + } + IPage pagging = baseMapper.getUserList(page, qw, orgSid); + List list = pagging.getRecords(); + list.removeAll(Collections.singleton(null)); + if (!list.isEmpty()) { + for (AppSysStaffVo vo : list) { + String headImage = vo.getHeadImage(); + if (StringUtils.isNotBlank(headImage)) { + if (!headImage.contains(fileUploadComponent.getUrlPrefix())) { + headImage = fileUploadComponent.getUrlPrefix() + headImage; + } + vo.setUserImage(headImage); + } + } + } + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } } \ No newline at end of file