feat:医共体

dev_unify
chenhc 3 months ago
parent 3a9cd5629a
commit 6d4e107586

@ -677,7 +677,7 @@ public class InvWarehouseController extends BaseController {
public BaseResponse unifyWarehouseList() {
FilterInvSubWarehouseRequest filterInvSubWarehouseRequest = new FilterInvSubWarehouseRequest();
filterInvSubWarehouseRequest.setUnifyUse(true);
filterInvSubWarehouseRequest.setSpUse(true);
// filterInvSubWarehouseRequest.setSpUse(true);
List<InvWarehouseEntity> responses = invWarehouseService.unifyWarehouseList(filterInvSubWarehouseRequest);
return ResultVOUtils.success(responses);
}

@ -15,8 +15,10 @@ import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.constant.SocketMsgType;
import com.glxp.api.controller.BaseController;
import com.glxp.api.controller.sync.SpsSyncWebSocket;
import com.glxp.api.dao.auth.WarehouseUserDao;
import com.glxp.api.dao.basic.UdiRelevanceDao;
import com.glxp.api.dto.DictDto;
import com.glxp.api.entity.auth.InvWarehouseEntity;
import com.glxp.api.entity.basic.*;
import com.glxp.api.entity.sync.SocketMsgEntity;
import com.glxp.api.entity.system.SystemParamConfigEntity;
@ -24,6 +26,7 @@ import com.glxp.api.entity.thrsys.CodeRel;
import com.glxp.api.entity.thrsys.ThrProductsEntity;
import com.glxp.api.entity.thrsys.ThrSystemEntity;
import com.glxp.api.http.ErpBasicClient;
import com.glxp.api.req.auth.FilterInvLinkDataRequest;
import com.glxp.api.req.basic.*;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest;
@ -51,10 +54,8 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
@RestController
public class UdiRelevanceController extends BaseController {
@ -75,6 +76,8 @@ public class UdiRelevanceController extends BaseController {
@Resource
UdiRlSupService udiRlSupService;
@Resource
WarehouseUserDao warehouseUserDao;
@Resource
ProductInfoService productInfoService;
@Resource
UdiRelevanceDao udiRelevanceDao;
@ -644,6 +647,23 @@ public class UdiRelevanceController extends BaseController {
FilterBasicThirdSysRequest filterBasicThirdSysRequest = new FilterBasicThirdSysRequest();
filterBasicThirdSysRequest.setEnabled(true);
String customerId = getCustomerId();
if (!"110".equals(customerId)){
FilterInvLinkDataRequest filterInvLinkDataRequest = new FilterInvLinkDataRequest();
filterInvLinkDataRequest.setCustomerId(customerId);
List<InvWarehouseEntity> invWarehouseEntities = warehouseUserDao.authWarehouseListByCustomerId(filterInvLinkDataRequest);
if (CollUtil.isNotEmpty(invWarehouseEntities)){
List<String> thirdIds = invWarehouseEntities.stream()
.map(InvWarehouseEntity::getThirdId) // 提取 thirdId
.filter(Objects::nonNull) // 排除 null 值
.filter(s -> !s.isEmpty()) // 排除空字符串
.distinct() // 去重
.collect(Collectors.toList()); // 收集到 List
filterBasicThirdSysRequest.setThirdIds(thirdIds);
}
}
List<ThrSystemEntity> basicThirdSysEntities = thrSystemService.filterBasicThiSys(filterBasicThirdSysRequest);
List<BasicProductThirdSysResponse> basicProductThirdSysResponses = new ArrayList<>();
@ -750,7 +770,23 @@ public class UdiRelevanceController extends BaseController {
return ResultVOUtils.success(pageSimpleResponse);
}
private BasicProductThirdSysResponse createResponse(ThrSystemEntity thrSystemEntity, UdiRelevanceEntity udiRelevanceEntity, ThrDataService thrDataService, String thirdId) {
BasicProductThirdSysResponse basicProductThirdSysResponse = new BasicProductThirdSysResponse();
if (StrUtil.isNotEmpty(udiRelevanceEntity.getThirdId()))
basicProductThirdSysResponse.setThirdId(udiRelevanceEntity.getThirdId());
basicProductThirdSysResponse.setSysName(thrSystemEntity.getThirdName());
basicProductThirdSysResponse.setSysId(thrSystemEntity.getThirdId());
if (udiRelevanceEntity.getThirdId()!= null &&!udiRelevanceEntity.getThirdId().isEmpty()) {
ThrProductsEntity thrProductsEntity = thrDataService.getProducts(udiRelevanceEntity.getThirdId(), thirdId);
if (thrProductsEntity!= null) {
basicProductThirdSysResponse.setManufactory(thrProductsEntity.getManufactory());
basicProductThirdSysResponse.setRegisterNo(thrProductsEntity.getRegisterNo());
basicProductThirdSysResponse.setSpec(thrProductsEntity.getSpec());
basicProductThirdSysResponse.setThirdName(thrProductsEntity.getName());
}
}
return basicProductThirdSysResponse;
}
//获取是否启用供应商维护产品信息
@AuthRuleAnnotation("")
@GetMapping("/udiwms/udiinfo/spcombie")

@ -1,6 +1,7 @@
package com.glxp.api.dao.auth;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.auth.InvWarehouseEntity;
import com.glxp.api.entity.auth.WarehouseUserEntity;
import com.glxp.api.entity.system.CompanyEntity;
import com.glxp.api.req.auth.FilterInvLinkDataRequest;
@ -72,4 +73,6 @@ public interface WarehouseUserDao extends BaseMapperPlus<WarehouseUserDao, Wareh
Integer countByCode(@Param("code") String code);
List<CompanyEntity> warehouseListByCode(FilterInvLinkDataRequest filterInvLinkDataRequest);
List<InvWarehouseEntity> authWarehouseListByCustomerId(FilterInvLinkDataRequest filterInvLinkDataRequest);
}

@ -98,6 +98,12 @@ public class InvWarehouseEntity {
@TableField(value = "unifyUse")
private Boolean unifyUse;
/**
*
*/
@TableField(value = "thirdSysFk")
private String thirdSysFk;
@TableField(value = "updateTime")
private Date updateTime;

@ -67,6 +67,104 @@ public class UdiRelevanceEntity {
@TableField(value = "thirdId4")
private String thirdId4;
/**
* ID4
*/
@TableField(value = "thirdId5")
private String thirdId5;
/**
* ID4
*/
@TableField(value = "thirdId6")
private String thirdId6;
/**
* ID4
*/
@TableField(value = "thirdId7")
private String thirdId7;
/**
* ID4
*/
@TableField(value = "thirdId8")
private String thirdId8;
/**
* ID4
*/
@TableField(value = "thirdId9")
private String thirdId9;
/**
* ID4
*/
@TableField(value = "thirdId10")
private String thirdId10;
/**
* ID4
*/
@TableField(value = "thirdId11")
private String thirdId11;
/**
* ID4
*/
@TableField(value = "thirdId12")
private String thirdId12;
/**
* ID4
*/
@TableField(value = "thirdId13")
private String thirdId13;
/**
* ID4
*/
@TableField(value = "thirdId14")
private String thirdId14;
/**
* ID4
*/
@TableField(value = "thirdId15")
private String thirdId15;
/**
* ID4
*/
@TableField(value = "thirdId16")
private String thirdId16;
/**
* ID4
*/
@TableField(value = "thirdId17")
private String thirdId17;
/**
* ID4
*/
@TableField(value = "thirdId18")
private String thirdId18;
/**
* ID4
*/
@TableField(value = "thirdId19")
private String thirdId19;
/**
* ID4
*/
@TableField(value = "thirdId20")
private String thirdId20;
/**
*
*/

@ -19,6 +19,7 @@ public class FilterInvLinkDataRequest extends ListPageRequest {
private Long listUser[];
private String parentId;
private List<CompanyEntity> customerList;
private String customerId;
}

@ -3,10 +3,13 @@ package com.glxp.api.req.thrsys;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.List;
@Data
public class FilterBasicThirdSysRequest extends ListPageRequest {
private String thirdId;
private List<String> thirdIds;
private String thirdName;
private Boolean enabled;
private Integer fromType;

@ -3,7 +3,7 @@ server:
spring:
datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://192.168.0.50:3306/udi_spms_hlhy?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
jdbc-url: jdbc:p6spy:mysql://192.168.0.43:3306/udi_spms_unify?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
hikari:

@ -348,4 +348,22 @@
</where>
</select>
<select id="authWarehouseListByCustomerId" parameterType="com.glxp.api.req.auth.FilterInvUserRequest"
resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
SELECT aw.*
FROM auth_warehouse_unify awu
LEFT JOIN auth_warehouse aw ON awu.code = aw.code
<where>
<if test="code != '' and code != null">
AND awu.code = #{code}
</if>
<if test="key != null and key != ''">
AND aw.`companyName` like CONCAT('%', #{key}, '%')
</if>
<if test="customerId != '' and customerId != null">
AND awu.customerId = #{customerId}
</if>
</where>
</select>
</mapper>

@ -36,6 +36,13 @@
<if test="mainSys != '' and mainSys != null">
AND mainSys = #{mainSys}
</if>
<if test="thirdIds != null and thirdIds.size() != 0">
and thirdId in
<foreach collection="thirdIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<select id="selectByThirdId" parameterType="Map" resultType="com.glxp.api.entity.thrsys.ThrSystemEntity">

@ -1281,4 +1281,73 @@ CREATE TABLE IF NOT EXISTS `auth_warehouse_unify` (
`customerId` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '客户ID',
`updateTime` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='医院共同体关系表';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='医院共同体关系表';
CALL Pro_Temp_ColumnWork('auth_warehouse', 'thirdSysFk',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''绑定三方系统标识''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId5',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID5''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId6',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID6''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId7',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID7''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId8',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID8''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId9',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID9''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId10',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID10''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId11',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID11''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId12',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID12''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId13',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID13''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId14',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID14''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId15',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID15''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId16',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID16''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId17',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID17''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId18',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID18''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId19',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID19''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'thirdId20',
' varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''第三方产品ID20''',
1);
Loading…
Cancel
Save