diff --git a/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/CareDirectiveApi.java b/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/CareDirectiveApi.java index 9fc82b0d..a1ef23c7 100644 --- a/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/CareDirectiveApi.java +++ b/nursing-unit-api/src/main/java/com/nu/modules/pad/directiveplan/api/CareDirectiveApi.java @@ -6,6 +6,7 @@ import com.nu.entity.*; import com.nu.modules.config.IDirectiveConfigApi; import com.nu.modules.care.api.ICareDirectivePlanApi; import com.nu.modules.order.api.IDirectiveOrderApi; +import com.nu.modules.servicepackage.IDirectivePackageApi; import lombok.extern.slf4j.Slf4j; import org.apache.commons.compress.utils.Lists; import org.apache.commons.lang.StringUtils; @@ -34,6 +35,8 @@ public class CareDirectiveApi { private ICareDirectivePlanApi careDirectivePlanApi; @Autowired private IDirectiveOrderApi directiveOrderApi; + @Autowired + private IDirectivePackageApi directivePackageApi; /** * 获取护理类服务指令树-配置数据 @@ -57,6 +60,19 @@ public class CareDirectiveApi { return Result.OK(pageList); } + /** + * 获取指令包集合数据 + * + * @param careDirectivePackageEntity + * @return + */ + @GetMapping(value = "/getNcPackagelist1") + public Result> getNcPackagelist(CareDirectivePackageEntity careDirectivePackageEntity) { + careDirectivePackageEntity.seti + List pageList = directivePackageApi.getNcPackagelist(careDirectivePackageEntity, null); + return Result.OK(pageList); + } + /** * PAD端保存长者标签 * diff --git a/nursing-unit-common/src/main/java/com/nu/entity/CareDirectivePackageEntity.java b/nursing-unit-common/src/main/java/com/nu/entity/CareDirectivePackageEntity.java index 3e236906..76d51147 100644 --- a/nursing-unit-common/src/main/java/com/nu/entity/CareDirectivePackageEntity.java +++ b/nursing-unit-common/src/main/java/com/nu/entity/CareDirectivePackageEntity.java @@ -53,4 +53,6 @@ public class CareDirectivePackageEntity implements Serializable { // 服务指令集合 private List directivesList; + private String instructionTagId; + } diff --git a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/mq/suppliers/listener/SuppliersMQListener.java b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/mq/suppliers/listener/SuppliersMQListener.java index cf3135db..143829ad 100644 --- a/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/mq/suppliers/listener/SuppliersMQListener.java +++ b/nursing-unit-invoicing/nu-invoicing-biz/src/main/java/com/nu/mq/suppliers/listener/SuppliersMQListener.java @@ -27,6 +27,7 @@ public class SuppliersMQListener { private INuConfigSuppliersApplyService nuConfigSuppliersApplyService; @Autowired private IConfigSuppliersInfoService configSuppliersInfoService; + /** * 供应商-供应商申请合作 */ @@ -42,10 +43,10 @@ public class SuppliersMQListener { public void applyStatus(SuppliersInfoMQDto suppliersInfoMQDto) { try { QueryWrapper qw = new QueryWrapper<>(); - qw.eq("suppliers_id",suppliersInfoMQDto.getSuppliersId()); + qw.eq("suppliers_id", suppliersInfoMQDto.getSuppliersId()); NuConfigSuppliersApply upData = new NuConfigSuppliersApply(); upData.setIzHistory("Y"); - nuConfigSuppliersApplyService.update(upData,qw); + nuConfigSuppliersApplyService.update(upData, qw); NuConfigSuppliersApply configSuppliersApply = new NuConfigSuppliersApply(); BeanUtils.copyProperties(suppliersInfoMQDto, configSuppliersApply); @@ -78,8 +79,8 @@ public class SuppliersMQListener { NuConfigSuppliersApply applyUpdateData = new NuConfigSuppliersApply(); applyUpdateData.setIzHistory("Y"); UpdateWrapper uw = new UpdateWrapper<>(); - uw.eq("suppliers_id",suppliersInfoMQDto.getSuppliersId()); - nuConfigSuppliersApplyService.update(applyUpdateData,uw); + uw.eq("suppliers_id", suppliersInfoMQDto.getSuppliersId()); + nuConfigSuppliersApplyService.update(applyUpdateData, uw); //插入信息变更审核数据 NuConfigSuppliersApply applyData = new NuConfigSuppliersApply(); @@ -136,6 +137,23 @@ public class SuppliersMQListener { configSuppliersInfo.setOpeningBankNo(suppliersInfoMQDto.getOpeningBankNo());//开户行账号 configSuppliersInfo.setImgPath(suppliersInfoMQDto.getImgPath());//资质照片 configSuppliersInfoService.updateById(configSuppliersInfo); + + QueryWrapper applyQW = new QueryWrapper<>(); + applyQW.eq("suppliers_id", suppliersInfoMQDto.getSuppliersId()); + applyQW.eq("iz_history", "N"); + NuConfigSuppliersApply applyOne = nuConfigSuppliersApplyService.getOne(applyQW); + //供应商变更信息时,如果本机构处于入驻申请 需要把信息变为最新的 + if (applyOne != null && "1".equals(applyOne.getApplyStatus())) { + applyOne.setSuppliersName(suppliersInfoMQDto.getSuppliersName());//供应商名称 + applyOne.setSuppliersNature(suppliersInfoMQDto.getSuppliersNature());//供应商性质 + applyOne.setSuppliersAddress(suppliersInfoMQDto.getSuppliersAddress());//供应商地址 + applyOne.setPersonInCharge(suppliersInfoMQDto.getPersonInCharge());//负责人 + applyOne.setContactNumber(suppliersInfoMQDto.getContactNumber());//联系电话 + applyOne.setOpeningBank(suppliersInfoMQDto.getOpeningBank());//开户行 + applyOne.setOpeningBankNo(suppliersInfoMQDto.getOpeningBankNo());//开户行账号 + applyOne.setImgPath(suppliersInfoMQDto.getImgPath());//资质照片 + nuConfigSuppliersApplyService.updateById(applyOne); + } System.out.println("保存成功"); } catch (Exception e) { e.printStackTrace(); diff --git a/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/servicepackage/IDirectivePackageApi.java b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/servicepackage/IDirectivePackageApi.java new file mode 100644 index 00000000..19bcc2a2 --- /dev/null +++ b/nursing-unit-services/nu-services-api/nu-services-local-api/src/main/java/com/nu/modules/servicepackage/IDirectivePackageApi.java @@ -0,0 +1,11 @@ +package com.nu.modules.servicepackage; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.nu.entity.CareDirectivePackageEntity; + +import java.util.List; +import java.util.Map; + +public interface IDirectivePackageApi { + public List getNcPackagelist(CareDirectivePackageEntity directivePackageEntity, IPage pageList); +} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/mapper/xml/DirectivePackageMapper.xml b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/mapper/xml/DirectivePackageMapper.xml index d29bd6c5..90ee4ced 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/mapper/xml/DirectivePackageMapper.xml +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/mapper/xml/DirectivePackageMapper.xml @@ -152,10 +152,12 @@ (SELECT * FROM nu_config_directive_package del_flag = '0' - and id in - - #{item.id} - + + and id in + + #{item.id} + + and instruction_tag_id = #{directivePackage.instructionTagId} diff --git a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/service/impl/DirectivePackageServiceImpl.java b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/service/impl/DirectivePackageServiceImpl.java index 5220d481..3cb719b1 100644 --- a/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/service/impl/DirectivePackageServiceImpl.java +++ b/nursing-unit-services/nu-services-biz/src/main/java/com/nu/modules/config/directivepackage/service/impl/DirectivePackageServiceImpl.java @@ -1,11 +1,15 @@ package com.nu.modules.config.directivepackage.service.impl; +import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.google.common.collect.Lists; +import com.nu.entity.CareDirectivePackageEntity; import com.nu.modules.config.directivepackage.entity.DirectivePackage; import com.nu.modules.config.directivepackage.mapper.DirectivePackageMapper; import com.nu.modules.config.directivepackage.service.IDirectivePackageService; +import com.nu.modules.servicepackage.IDirectivePackageApi; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import java.util.List; @@ -17,7 +21,7 @@ import java.util.List; * @Version: V1.0 */ @Service -public class DirectivePackageServiceImpl extends ServiceImpl implements IDirectivePackageService { +public class DirectivePackageServiceImpl extends ServiceImpl implements IDirectivePackageService, IDirectivePackageApi { @Override public void saveDirectives(DirectivePackage directivePackage) { @@ -35,7 +39,7 @@ public class DirectivePackageServiceImpl extends ServiceImpl pageList) { - List record = baseMapper.queryList(directivePackage,pageList.getRecords()); + List record = baseMapper.queryList(directivePackage, pageList.getRecords()); pageList.setRecords(record); } @@ -49,4 +53,11 @@ public class DirectivePackageServiceImpl extends ServiceImpl getNcPackagelist(CareDirectivePackageEntity directivePackageEntity, IPage pageList) { + DirectivePackage directivePackage = new DirectivePackage(); + BeanUtils.copyProperties(directivePackageEntity,directivePackage); + List record = baseMapper.queryList(directivePackage, null); + return BeanUtil.copyToList(record, CareDirectivePackageEntity.class); + } }