平潭新增患者信息下载

dtxyy
anthonywj 12 months ago
parent 135769fdda
commit 14048a3b19

@ -4,12 +4,14 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.mipsdl.client.CommonHttpClient;
import com.glxp.mipsdl.client.ptxhyy.entity.HisProductEntity;
import com.glxp.mipsdl.client.ptxhyy.entity.OrderUploadResponse;
@ -37,6 +39,7 @@ import com.glxp.mipsdl.entity.basic.BasicBussinessTypeEntity;
import com.glxp.mipsdl.entity.basic.BasicCorpEntity;
import com.glxp.mipsdl.entity.basic.BasicSkProjectEntity;
import com.glxp.mipsdl.entity.inout.*;
import com.glxp.mipsdl.entity.ptxhyy.SickerEntity;
import com.glxp.mipsdl.entity.thrsys.ThrInvWarehouseEntity;
import com.glxp.mipsdl.entity.thrsys.ThrSystemBusApiEntity;
import com.glxp.mipsdl.http.HttpClient;
@ -44,17 +47,20 @@ import com.glxp.mipsdl.req.base.UdiwmsInvProductsRequest;
import com.glxp.mipsdl.req.base.UdiwmsOrderDetailRequest;
import com.glxp.mipsdl.req.base.UdiwmsOrderRequest;
import com.glxp.mipsdl.req.ctqyy.DlThirdProjectRequest;
import com.glxp.mipsdl.req.ctqyy.GetSickRequest;
import com.glxp.mipsdl.req.ptxhyy.PtxhyyInvRequest;
import com.glxp.mipsdl.req.ptxhyy.PtxhyyOrderDetailRequest;
import com.glxp.mipsdl.req.ptxhyy.PtxhyyOrderRequest;
import com.glxp.mipsdl.res.BaseResponse;
import com.glxp.mipsdl.res.PageSimpleResponse;
import com.glxp.mipsdl.res.ptxhyy.PtxhInvResponse;
import com.glxp.mipsdl.res.udiwms.BasicSkSickerResponse;
import com.glxp.mipsdl.res.udiwms.ThrInvResultResponse;
import com.glxp.mipsdl.service.auth.AuthWarehouseService;
import com.glxp.mipsdl.service.order.OrderUploadLogService;
import com.glxp.mipsdl.service.thrsys.ThrCorpService;
import com.glxp.mipsdl.service.thrsys.ThrSystemDetailService;
import com.glxp.mipsdl.thirddao.ptxhyy.PtxhyySickerMapper;
import com.glxp.mipsdl.util.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -91,13 +97,8 @@ public class PtxhyyClient extends CommonHttpClient {
private final ThrDeptDao thrDeptDao;
@Resource
ThrHslbService thrHslbService;
@Resource
BasicSkProjectMapper basicSkProjectMapper;
@Resource
UdiRlSupDao udiRlSupDao;
@Resource
BasicDestinyRelMapper basicDestinyRelMapper;
PtxhyySickerMapper ptxhyySickerMapper;
@Override
public BaseResponse submitOrders(UdiwmsOrderRequest udiwmsOrderRequest) {
@ -478,10 +479,9 @@ public class PtxhyyClient extends CommonHttpClient {
thrInvResultResponse.setBillType("SC71021292871198"); //科室收费出库
thrInvResultResponse.setMainAction(ConstantType.TYPE_OUT);
List<ThrInvWarehouseEntity> thrInvWarehouseEntitys = thrInvWarehouseDao.selectList(new QueryWrapper<ThrInvWarehouseEntity>().eq("name", ptxhInvResponse.getZxks()));
List<ThrInvWarehouseEntity> thrInvWarehouseEntitys = thrInvWarehouseDao.selectList(new QueryWrapper<ThrInvWarehouseEntity>().eq("code", ptxhInvResponse.getZxksdm()));
if (CollUtil.isNotEmpty(thrInvWarehouseEntitys)) {
for (ThrInvWarehouseEntity thrInvWarehouseEntity : thrInvWarehouseEntitys) {
AuthWarehouseEntity authWarehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("thirdId", thrInvWarehouseEntity.getCode()).last("limit 1"));
if (authWarehouseEntity != null) {
thrInvResultResponse.setInvCode(authWarehouseEntity.getCode());
@ -495,6 +495,11 @@ public class PtxhyyClient extends CommonHttpClient {
thrInvResultResponse.setType(ptxhInvResponse.getLb());
thrInvResultResponse.setOutCount(ptxhInvResponse.getZsl());
thrInvResultResponse.setReCount(ptxhInvResponse.getZsl());
thrInvResultResponse.setSickerName(ptxhInvResponse.getBrxm());
thrInvResultResponse.setSickerCode(ptxhInvResponse.getJzhm());
if (StrUtil.isNotEmpty(ptxhInvResponse.getRq())) {
thrInvResultResponse.setChargeTime(DateUtil.timeStampToDate(Long.parseLong(ptxhInvResponse.getRq())));
}
thrInvResultResponses.add(thrInvResultResponse);
if (seenNames.add(ptxhInvResponse.getFyxh())) {
itemData.add(ptxhInvResponse);
@ -612,5 +617,29 @@ public class PtxhyyClient extends CommonHttpClient {
}
@Override
public BaseResponse getSickInfo(GetSickRequest getSickRequest) {
IPage<SickerEntity> page = new Page<>(getSickRequest.getPage(), getSickRequest.getLimit());
IPage<SickerEntity> productEntityIPage = ptxhyySickerMapper.selectPage(page, new QueryWrapper<SickerEntity>()
.lambda()
.like(StringUtils.isNotBlank(getSickRequest.getCode()), SickerEntity::getZYHM, getSickRequest.getCode())
.like(StringUtils.isNotBlank(getSickRequest.getName()), SickerEntity::getBRXM, getSickRequest.getName()));
productEntityIPage.getRecords().forEach(sickerEntity -> {
BasicSkSickerResponse.builder()
.sickerId(sickerEntity.getZYH())
.code(sickerEntity.getZYH())
.name(sickerEntity.getBRXM())
.adNum(sickerEntity.getZYHM())
.inHospTime(sickerEntity.getRYRQ())
.outHospTime(sickerEntity.getCYRQ())
.build();
});
PageSimpleResponse<SickerEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(productEntityIPage.getTotal());
pageSimpleResponse.setList(productEntityIPage.getRecords());
return ResultVOUtils.success(pageSimpleResponse);
}
}

@ -0,0 +1,25 @@
package com.glxp.mipsdl.entity.ptxhyy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName("UDI_ZY_BRRY")
public class SickerEntity {
@TableField("ZYHM")
private String ZYHM;
@TableField("ZYH")
private String ZYH;
@TableField("BRXM")
private String BRXM;
@TableField("RYRQ")
private Date RYRQ;
@TableField("CYRQ")
private Date CYRQ;
}

@ -0,0 +1,15 @@
package com.glxp.mipsdl.req.ptxhyy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
@Data
public class PtxhyySickRequest {
private String ZYHM;
private String ZYH;
private String BRXM;
private String RYRQ;
private String CYRQ;
}

@ -4,14 +4,18 @@ import lombok.Data;
@Data
public class PtxhInvResponse {
private String fyxh;
private String fymc;
private String fydj;
private String dw;
private String fyxm;
private String zxks;
private String zsl;
private String fyxh;
private String dw;
private String jzhm;
private String fymc;
private String jzh;
private String sl;
private String brxm;
private String rq;
private String lb;
private String zxksdm;
}

@ -114,5 +114,15 @@ public class BasicSkSickerResponse {
*
*/
private String remark;
/**
*
*/
private Date inHospTime;
/**
*
*/
private Date outHospTime;
}

@ -181,4 +181,5 @@ public class ThrInvResultResponse {
*/
private String chargeUser;
}

@ -0,0 +1,12 @@
package com.glxp.mipsdl.thirddao.ptxhyy;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.mipsdl.entity.ptxhyy.SickerEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
@DS("ptxhSql")
public interface PtxhyySickerMapper extends BaseMapper<SickerEntity> {
}

@ -467,4 +467,11 @@ public class DateUtil {
}
return str;
}
public static String timeStampToDate(long timestamp) {
Date date = new Date(timestamp);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String formattedDate = sdf.format(date);
return formattedDate;
}
}

@ -5,7 +5,7 @@ spring:
strict: false
datasource:
master:
url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt2?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
@ -23,6 +23,15 @@ spring:
# username: root
# password: 123456
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
ptxhSql:
# jdbc-url: jdbc:oracle:thin:@192.168.10.8:1521/njxyy
# username: SD_UDIJK
# password: SD_UDIJK
# driver-class-name: oracle.jdbc.driver.OracleDrive
url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_ct?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
hikari:
connection-timeout: 60000
maximum-pool-size: 60

@ -14,6 +14,11 @@ spring:
username: SD_UDIJK
password: SD_UDIJK
driver-class-name: oracle.jdbc.driver.OracleDriver
ptxhSql:
url: jdbc:oracle:thin:@55.55.0.1:1521/dbrac
username: udi
password: udi@2024.
driver-class-name: oracle.jdbc.driver.OracleDriver
hikari:
connection-timeout: 60000
maximum-pool-size: 60

@ -1,6 +1,6 @@
spring:
profiles:
active: pro
active: dev
servlet:
multipart:
max-file-size: 100MB

Loading…
Cancel
Save