添加物料信息、机构信息、供应商信息、员工信息、长者信息功能
This commit is contained in:
parent
196859a51d
commit
c93320b965
|
|
@ -80,6 +80,11 @@ public class NuBizAllMaterialInfo implements Serializable {
|
|||
@Excel(name = "销售单位", width = 15)
|
||||
@ApiModelProperty(value = "销售单位")
|
||||
private java.lang.String salesUnit;
|
||||
@Dict(dicCode = "iz_enabled")
|
||||
private java.lang.String izEnabled;
|
||||
private java.lang.String materialNo;
|
||||
private java.lang.String orgCode;
|
||||
private java.lang.String departName;
|
||||
/**是否提供*/
|
||||
@Excel(name = "是否提供", width = 15, dicCode = "yn")
|
||||
@TableField(exist = false)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,112 @@
|
|||
package com.nu.modules.baseinfo.controller;
|
||||
|
||||
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.nu.modules.baseinfo.entity.NuBaseInfo;
|
||||
import com.nu.modules.baseinfo.service.INuBaseInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 护理单元
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "护理单元")
|
||||
@RestController
|
||||
@RequestMapping("/nuBaseInfo/nuBaseInfo")
|
||||
@Slf4j
|
||||
public class NuBaseInfoController extends JeecgController<NuBaseInfo, INuBaseInfoService> {
|
||||
@Autowired
|
||||
private INuBaseInfoService nuBaseInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuBaseInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "护理单元-分页列表查询")
|
||||
@ApiOperation(value = "护理单元-分页列表查询", notes = "护理单元-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuBaseInfo>> queryPageList(NuBaseInfo nuBaseInfo,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
customeRuleMap.put("area_flag", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("status", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<NuBaseInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuBaseInfo, req.getParameterMap(), customeRuleMap);
|
||||
Page<NuBaseInfo> page = new Page<NuBaseInfo>(pageNo, pageSize);
|
||||
IPage<NuBaseInfo> pageList = nuBaseInfoService.getList(nuBaseInfo.getSysOrgCode(),page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 护理单元-入住信息分页列表查询
|
||||
*
|
||||
* @param nuBaseInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "护理单元-分页列表查询")
|
||||
@ApiOperation(value = "护理单元-入住信息分页列表查询", notes = "护理单元-入住信息分页列表查询")
|
||||
@GetMapping(value = "/queryNuOccupancyInfoList")
|
||||
public Result<IPage<NuBaseInfo>> queryNuOccupancyInfoList(NuBaseInfo nuBaseInfo,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
customeRuleMap.put("nu_name", QueryRuleEnum.LIKE_WITH_OR);
|
||||
customeRuleMap.put("nu_id", QueryRuleEnum.LIKE_WITH_OR);
|
||||
QueryWrapper<NuBaseInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuBaseInfo, req.getParameterMap(), customeRuleMap);
|
||||
queryWrapper.eq("area_flag","1");
|
||||
Page<NuBaseInfo> page = new Page<NuBaseInfo>(pageNo, pageSize);
|
||||
IPage<NuBaseInfo> pageList = nuBaseInfoService.page(page, queryWrapper);
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "护理单元-通过id查询")
|
||||
@ApiOperation(value = "护理单元-通过id查询", notes = "护理单元-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuBaseInfo> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
NuBaseInfo nuBaseInfo = nuBaseInfoService.getById(id);
|
||||
if (nuBaseInfo == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuBaseInfo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -61,7 +61,6 @@ public class NuBaseInfo implements Serializable {
|
|||
* 区域标签ID
|
||||
*/
|
||||
@Excel(name = "区域标签ID", width = 15, dicCode = "nu_type")
|
||||
@Dict(dicCode = "nu_type")
|
||||
@ApiModelProperty(value = "区域标签ID")
|
||||
private java.lang.String areaFlag;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.nu.modules.baseinfo.service;
|
||||
|
||||
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.IService;
|
||||
import com.nu.modules.baseinfo.entity.NuBaseInfo;
|
||||
|
||||
|
|
@ -11,4 +14,5 @@ import com.nu.modules.baseinfo.entity.NuBaseInfo;
|
|||
*/
|
||||
public interface INuBaseInfoService extends IService<NuBaseInfo> {
|
||||
|
||||
IPage<NuBaseInfo> getList(String sysOrgCode,Page<NuBaseInfo> page, QueryWrapper<NuBaseInfo> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.nu.modules.baseinfo.service.impl;
|
|||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
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 com.nu.entity.NuBaseInfoEntity;
|
||||
import com.nu.modules.baseinfo.api.INuBaseInfoApi;
|
||||
|
|
@ -120,4 +122,10 @@ public class NuBaseInfoServiceImpl extends ServiceImpl<NuBaseInfoMapper, NuBaseI
|
|||
|
||||
return mapList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@DS("#sysOrgCode")
|
||||
public IPage<NuBaseInfo> getList(String sysOrgCode,Page<NuBaseInfo> page, QueryWrapper<NuBaseInfo> queryWrapper) {
|
||||
return baseMapper.selectPage(page, queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,18 @@ public class NuEmployeesAdvisoryInfoController extends JeecgController<NuEmploye
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="员工信息-分页列表查询", notes="员工信息-分页列表查询")
|
||||
@GetMapping(value = "/getTjList")
|
||||
public Result<IPage<NuEmployeesAdvisoryInfo>> getTjList(NuEmployeesAdvisoryInfo nuEmployeesAdvisoryInfo,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuEmployeesAdvisoryInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuEmployeesAdvisoryInfo, req.getParameterMap());
|
||||
Page<NuEmployeesAdvisoryInfo> page = new Page<NuEmployeesAdvisoryInfo>(pageNo, pageSize);
|
||||
IPage<NuEmployeesAdvisoryInfo> pageList = nuEmployeesAdvisoryInfoService.getTjList(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
|
|
|
|||
|
|
@ -307,4 +307,10 @@ public class NuEmployeesAdvisoryInfo implements Serializable {
|
|||
private String serverUrl;
|
||||
@TableField(exist = false)
|
||||
private String modifyStatus;
|
||||
@TableField(exist = false)
|
||||
private String departName;
|
||||
@TableField(exist = false)
|
||||
private String entryTime;
|
||||
@TableField(exist = false)
|
||||
private String orgCode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
package com.nu.modules.employees.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.entity.EmployeesAdvisoryInfoEntity;
|
||||
import com.nu.modules.employees.entity.NuEmployeesAdvisoryInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
|
@ -24,4 +28,6 @@ public interface NuEmployeesAdvisoryInfoMapper extends BaseMapper<NuEmployeesAdv
|
|||
NuEmployeesAdvisoryInfo getEmployeeInfoByTel(@Param("tel") String tel);
|
||||
|
||||
NuEmployeesAdvisoryInfo queryEmployeeInfoById(@Param("id") String id);
|
||||
|
||||
IPage<NuEmployeesAdvisoryInfo> getTjList(Page<NuEmployeesAdvisoryInfo> page, @Param(Constants.WRAPPER) QueryWrapper<NuEmployeesAdvisoryInfo> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,4 +103,14 @@
|
|||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getTjList" resultType="com.nu.modules.employees.entity.NuEmployeesAdvisoryInfo">
|
||||
select * from (
|
||||
SELECT a.id,b.open_id,a.org_code,b.name,b.sex,b.tel,a.entry_time,c.depart_name,b.create_time
|
||||
from nu_biz_employees_org a
|
||||
left join nu_biz_employees_advisory_info b on a.open_id = b.open_id
|
||||
left join sys_depart c on a.org_code = c.org_code
|
||||
where a.iz_history = 'N' and a.status = '2' and b.open_id is not null
|
||||
) tab
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.nu.modules.employees.service;
|
||||
|
||||
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.IService;
|
||||
import com.nu.dto.EmployeesStatusMQDto;
|
||||
import com.nu.modules.employees.entity.NuEmployeesAdvisoryInfo;
|
||||
|
|
@ -13,4 +16,6 @@ import com.nu.modules.employees.entity.NuEmployeesAdvisoryInfo;
|
|||
public interface INuEmployeesAdvisoryInfoService extends IService<NuEmployeesAdvisoryInfo> {
|
||||
|
||||
void sendYgrz(EmployeesStatusMQDto dto);
|
||||
|
||||
IPage<NuEmployeesAdvisoryInfo> getTjList(Page<NuEmployeesAdvisoryInfo> page, QueryWrapper<NuEmployeesAdvisoryInfo> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -167,7 +168,7 @@ public class EmployeesOrgServiceImpl extends ServiceImpl<EmployeesOrgMapper, Emp
|
|||
}
|
||||
udto.setStatus(dto.getStatus());
|
||||
if ("2".equals(dto.getStatus())) {
|
||||
udto.setEntryTime(dto.getOpeTime());//审批通过的话将入职时间设置进去
|
||||
udto.setEntryTime(new Date());//审批通过的话将入职时间设置进去
|
||||
}
|
||||
baseMapper.update(udto, uw);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import cn.hutool.json.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.dto.EmployeesApplyMQDto;
|
||||
import com.nu.dto.EmployeesStatusMQDto;
|
||||
|
|
@ -202,6 +204,11 @@ public class NuEmployeesAdvisoryInfoServiceImpl extends ServiceImpl<NuEmployeesA
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<NuEmployeesAdvisoryInfo> getTjList(Page<NuEmployeesAdvisoryInfo> page, QueryWrapper<NuEmployeesAdvisoryInfo> queryWrapper) {
|
||||
return baseMapper.getTjList(page, queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getEmployeeInfo(String tel) {
|
||||
JSONObject resultData = new JSONObject();
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class EmployeesMQListener {
|
|||
employeesOrg.setStatus(dto.getAuditStatus());
|
||||
employeesOrg.setAuditContent(dto.getAuditContent());
|
||||
if ("2".equals(dto.getAuditStatus())) {
|
||||
employeesOrg.setEntryTime(dto.getEntryTime());//审批通过的话将入职时间设置进去
|
||||
employeesOrg.setEntryTime(new Date());//审批通过的话将入职时间设置进去
|
||||
//修改员工注册表的入驻状态
|
||||
NuEmployeesAdvisoryInfo employeesAd = new NuEmployeesAdvisoryInfo();
|
||||
employeesAd.setId(dto.getEmployeeId());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
package com.nu.modules.elderinfo.controller;
|
||||
|
||||
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.nu.modules.elderinfo.entity.ElderInfo;
|
||||
import com.nu.modules.elderinfo.service.IElderInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 长者标签备份子表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-08-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "长者标签备份子表")
|
||||
@RestController
|
||||
@RequestMapping("/elderInfo/elderInfo")
|
||||
@Slf4j
|
||||
public class ElderInfoController extends JeecgController<ElderInfo, IElderInfoService> {
|
||||
@Autowired
|
||||
private IElderInfoService elderInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param elderInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "长者标签备份子表-分页列表查询")
|
||||
@ApiOperation(value = "长者信息-分页列表查询", notes = "长者信息-分页列表查询")
|
||||
@GetMapping(value = "/getElderTjList")
|
||||
public Result<IPage<ElderInfo>> getElderTjList(ElderInfo elderInfo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
|
||||
QueryWrapper<ElderInfo> queryWrapper = QueryGenerator.initQueryWrapper(elderInfo, req.getParameterMap());
|
||||
Page<ElderInfo> page = new Page<ElderInfo>(pageNo, pageSize);
|
||||
IPage<ElderInfo> pageList = elderInfoService.getElderTjList(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -39,7 +39,6 @@ public class ElderInfo implements Serializable {
|
|||
*/
|
||||
@Excel(name = "护理单元", width = 15)
|
||||
@ApiModelProperty(value = "护理单元")
|
||||
@Dict(dicCode = "nu_id", dicText = "nu_name", dictTable = "nu_base_info")
|
||||
private java.lang.String nuId;
|
||||
/**
|
||||
* 姓名
|
||||
|
|
@ -369,6 +368,8 @@ public class ElderInfo implements Serializable {
|
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date checkinTime;
|
||||
|
||||
private String headPath;//长者头像
|
||||
private String guardianHeadPath;//监护人头像
|
||||
|
||||
/**
|
||||
* 医保类型中文名
|
||||
|
|
@ -385,7 +386,10 @@ public class ElderInfo implements Serializable {
|
|||
*/
|
||||
@TableField(exist = false)
|
||||
private String jfztName;
|
||||
private String headPath;//长者头像
|
||||
private String guardianHeadPath;//监护人头像
|
||||
|
||||
@TableField(exist = false)
|
||||
private String nuName;
|
||||
@TableField(exist = false)
|
||||
private String departName;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
package com.nu.modules.elderinfo.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.modules.elderinfo.entity.ElderInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
|
@ -24,4 +28,6 @@ public interface ElderInfoMapper extends BaseMapper<ElderInfo> {
|
|||
* @return
|
||||
*/
|
||||
List<ElderInfoEntity> selectModifyHisByOpenId(@Param("openId") String openId);
|
||||
|
||||
IPage<ElderInfo> getElderTjList(Page<ElderInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ElderInfo> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,4 +35,15 @@
|
|||
where mi.guardian_open_id = #{openId}
|
||||
and mi.modify_status != '0'
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="getElderTjList" resultType="com.nu.modules.elderinfo.entity.ElderInfo">
|
||||
select * from (
|
||||
select a.*,b.nu_name,c.depart_name from nu_biz_elder_info a
|
||||
left join nu_devops.nu_base_info b on a.nu_id = b.nu_id and a.sys_org_code = b.sys_org_code
|
||||
left join sys_depart c on a.sys_org_code = c.org_code
|
||||
) tab
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.nu.modules.elderinfo.service;
|
||||
|
||||
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.nu.modules.elderinfo.entity.ElderInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
|
@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface IElderInfoService extends IService<ElderInfo> {
|
||||
|
||||
IPage<ElderInfo> getElderTjList(Page<ElderInfo> page, QueryWrapper<ElderInfo> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
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 com.nu.entity.ElderInfoEntity;
|
||||
import com.nu.modules.elder.api.IElderInfoApi;
|
||||
|
|
@ -201,4 +203,9 @@ public class ElderInfoServiceImpl extends ServiceImpl<ElderInfoMapper, ElderInfo
|
|||
BeanUtils.copyProperties(elderInfo,elderInfoEntity);
|
||||
return elderInfoEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ElderInfo> getElderTjList(Page<ElderInfo> page, QueryWrapper<ElderInfo> queryWrapper) {
|
||||
return baseMapper.getElderTjList(page,queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ public class ConfigMaterialInfoServiceImpl extends ServiceImpl<ConfigMaterialInf
|
|||
List<SysDataSource> list = sysDataSourceService.list(queryWrapper);
|
||||
|
||||
// 使用Set去重
|
||||
Set<String> uniqueKeys = new HashSet<>();
|
||||
List<NuBizAllMaterialInfo> distinctList = new ArrayList<>();
|
||||
|
||||
// 2.查询所有的可用数据
|
||||
|
|
@ -63,23 +62,16 @@ public class ConfigMaterialInfoServiceImpl extends ServiceImpl<ConfigMaterialInf
|
|||
List<ConfigMaterialInfo> list1 = configMaterialInfoService.queryList(dataSourceCode);
|
||||
|
||||
for (ConfigMaterialInfo config : list1) {
|
||||
// 创建唯一键
|
||||
String uniqueKey = config.getMaterialName() + "|" +
|
||||
config.getSpecificationModel() + "|" +
|
||||
config.getBrandType() + "|" +
|
||||
config.getManufacturer();
|
||||
|
||||
// 去重
|
||||
if (!uniqueKeys.contains(uniqueKey)) {
|
||||
uniqueKeys.add(uniqueKey);
|
||||
|
||||
NuBizAllMaterialInfo lsbl = new NuBizAllMaterialInfo();
|
||||
lsbl.setMaterialName(config.getMaterialName());
|
||||
lsbl.setSpecificationModel(config.getSpecificationModel());
|
||||
lsbl.setBrandType(config.getBrandType());
|
||||
lsbl.setManufacturer(config.getManufacturer());
|
||||
distinctList.add(lsbl);
|
||||
}
|
||||
NuBizAllMaterialInfo lsbl = new NuBizAllMaterialInfo();
|
||||
lsbl.setMaterialName(config.getMaterialName());
|
||||
lsbl.setSpecificationModel(config.getSpecificationModel());
|
||||
lsbl.setBrandType(config.getBrandType());
|
||||
lsbl.setManufacturer(config.getManufacturer());
|
||||
lsbl.setMaterialNo(config.getMaterialNo());
|
||||
lsbl.setIzEnabled(config.getIzEnabled());
|
||||
lsbl.setOrgCode(sysDataSource.getCode());
|
||||
lsbl.setDepartName(sysDataSource.getName());
|
||||
distinctList.add(lsbl);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
Loading…
Reference in New Issue