长泰区医院库存出库明细

dev
anthonywj 1 year ago
parent f9de1f95e5
commit c93c0bc195

@ -74,13 +74,22 @@ public interface BaseHttpClient {
/**
*
*
*
* @param udiwmsInvProductsRequest
* @return
*/
BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest);
/**
*
*
* @param udiwmsInvProductsRequest
* @return
*/
BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest);
/**
*
*

@ -276,4 +276,10 @@ public abstract class CommonHttpClient implements BaseHttpClient {
public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
return null;
}
@Override
public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
return null;
}
}

@ -8,10 +8,12 @@ import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson2.JSON;
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.toolkit.Wrappers;
import com.glxp.mipsdl.client.CommonHttpClient;
import com.glxp.mipsdl.client.ctqyy.entity.InvResultEntity;
import com.glxp.mipsdl.config.ThirdSysConfig;
import com.glxp.mipsdl.constant.ConstantType;
import com.glxp.mipsdl.constant.Constants;
@ -47,10 +49,13 @@ import com.glxp.mipsdl.http.HttpClient;
import com.glxp.mipsdl.req.base.*;
import com.glxp.mipsdl.req.ctqyy.*;
import com.glxp.mipsdl.req.post.*;
import com.glxp.mipsdl.req.ptxhyy.PtxhyyInvRequest;
import com.glxp.mipsdl.req.zaxyy.ZaxzyyOrderRequest;
import com.glxp.mipsdl.req.zzzyy.ZzzyyRequest;
import com.glxp.mipsdl.res.BaseResponse;
import com.glxp.mipsdl.res.PageSimpleResponse;
import com.glxp.mipsdl.res.ctqyy.CtBaseResponse;
import com.glxp.mipsdl.res.ptxhyy.PtxhInvResponse;
import com.glxp.mipsdl.res.udiwms.*;
import com.glxp.mipsdl.service.auth.AuthWarehouseService;
import com.glxp.mipsdl.service.order.OrderUploadLogService;
@ -66,6 +71,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -709,6 +715,125 @@ public class CtqyyClient extends CommonHttpClient {
}
/**
*
*
* @param udiwmsInvProductsRequest
* @return
*/
@Override
public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialUnit"));
ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(ptxhyyInvRequest));
// String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_GET_INV_RESULT), ctqyyRequest);
String response = "{\"code\":20000,\"message\":\"success\",\"data\":{\"list\":[{\"applyNo\":\"74192\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"65\",\"CreditName\":\"急诊科\",\"AccoutDate\":\"2024-02-2210:36:28\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"77375\",\"materialName\":\"一次性注射器2ml\",\"materialSpec\":\"0.6\",\"materialUnit\":\"支\",\"batchNo\":65212,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":200,\"importPrc\":0.21,\"importMoney\":42,\"factoryCode\":\"0006064349\",\"factoryName\":\"河南曙光汇知康生物科技股份有限公司\"},{\"applyNo\":\"74208\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"70\",\"CreditName\":\"手术室\",\"AccoutDate\":\"2024-02-2315:29:48\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"31585\",\"materialName\":\"一次性使用鼻氧管(吸氧管)\",\"materialSpec\":\"长单鼻/条\",\"materialUnit\":\"条\",\"batchNo\":64113,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":19,\"importPrc\":1.15,\"importMoney\":21.85,\"factoryCode\":\"0006063576\",\"factoryName\":\"苏州市麦克林医疗器械制品有限公司\"},{\"applyNo\":\"74208\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"70\",\"CreditName\":\"手术室\",\"AccoutDate\":\"2024-02-2315:29:48\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"31585\",\"materialName\":\"一次性使用鼻氧管(吸氧管)\",\"materialSpec\":\"长单鼻/条\",\"materialUnit\":\"条\",\"batchNo\":65526,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":81,\"importPrc\":1.15,\"importMoney\":93.15,\"factoryCode\":\"0006063576\",\"factoryName\":\"苏州市麦克林医疗器械制品有限公司\"},{\"applyNo\":\"74209\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"92\",\"CreditName\":\"儿科\",\"AccoutDate\":\"2024-02-2315:31:58\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"30936\",\"materialName\":\"一次性静脉输液针51/2\",\"materialSpec\":\"/条\",\"materialUnit\":\"条\",\"batchNo\":64898,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":250,\"importPrc\":0.17,\"importMoney\":42.5,\"factoryCode\":\"0006063565\",\"factoryName\":\"浙江康康\"}],\"total\":4}}";
BaseResponse<PageSimpleResponse<InvResultEntity>> baseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<InvResultEntity>>>() {
});
if (baseResponse.getCode() == 20000) {
List<InvResultEntity> ptxhInvResponses = baseResponse.getData().getList();
List<ThrInvResultResponse> thrInvResultResponses = new ArrayList<>();
if (CollUtil.isNotEmpty(ptxhInvResponses)) {
for (InvResultEntity ptxhInvResponse : ptxhInvResponses) {
ThrInvResultResponse thrInvResultResponse = new ThrInvResultResponse();
thrInvResultResponse.setThrCode(ptxhInvResponse.getMaterialCode());
thrInvResultResponse.setCpmctymc(ptxhInvResponse.getMaterialName());
thrInvResultResponse.setGgxh(ptxhInvResponse.getMaterialSpec());
thrInvResultResponse.setBatchNo(ptxhInvResponse.getBatchNo());
thrInvResultResponse.setMeasname(ptxhInvResponse.getMaterialUnit());
thrInvResultResponse.setPrice(BigDecimal.valueOf(ptxhInvResponse.getImportPrc()));
thrInvResultResponse.setAmount(BigDecimal.valueOf(ptxhInvResponse.getImportMoney()));
// thrInvResultResponse.setDeptName(ptxhInvResponse.getDebitName());
// thrInvResultResponse.setDeptCode(ptxhInvResponse.getDebit());
// thrInvResultResponse.setInvName(ptxhInvResponse.getCreditName());
// thrInvResultResponse.setInvCode(ptxhInvResponse.getCredit());
thrInvResultResponse.setDeptName(ptxhInvResponse.getDebitName());
thrInvResultResponse.setDeptCode("1002");
thrInvResultResponse.setInvName(ptxhInvResponse.getCreditName());
thrInvResultResponse.setInvCode("1000003");
thrInvResultResponse.setManufacturer(ptxhInvResponse.getFactoryName());
thrInvResultResponse.setManufactoryCode(ptxhInvResponse.getFactoryCode());
thrInvResultResponse.setMainAction(ConstantType.TYPE_OUT);
thrInvResultResponse.setBillType(ptxhInvResponse.getIoType());
thrInvResultResponse.setType("1");
thrInvResultResponse.setOutCount(ptxhInvResponse.getQuantity() + "");
thrInvResultResponse.setReCount(ptxhInvResponse.getQuantity() + "");
thrInvResultResponses.add(thrInvResultResponse);
}
}
PageSimpleResponse<ThrInvResultResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(thrInvResultResponses.size() + 0l);
pageSimpleResponse.setList(thrInvResultResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
return baseResponse;
}
@Override
public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem"));
ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(ptxhyyInvRequest));
// String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_GET_INV_RESULT), ctqyyRequest);
String response = "{\"code\":20000,\"message\":\"success\",\"data\":{\"list\":[{\"applyNo\":\"74192\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"65\",\"CreditName\":\"急诊科\",\"AccoutDate\":\"2024-02-2210:36:28\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"77375\",\"materialName\":\"一次性注射器2ml\",\"materialSpec\":\"0.6\",\"materialUnit\":\"支\",\"batchNo\":65212,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":200,\"importPrc\":0.21,\"importMoney\":42,\"factoryCode\":\"0006064349\",\"factoryName\":\"河南曙光汇知康生物科技股份有限公司\"},{\"applyNo\":\"74208\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"70\",\"CreditName\":\"手术室\",\"AccoutDate\":\"2024-02-2315:29:48\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"31585\",\"materialName\":\"一次性使用鼻氧管(吸氧管)\",\"materialSpec\":\"长单鼻/条\",\"materialUnit\":\"条\",\"batchNo\":64113,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":19,\"importPrc\":1.15,\"importMoney\":21.85,\"factoryCode\":\"0006063576\",\"factoryName\":\"苏州市麦克林医疗器械制品有限公司\"},{\"applyNo\":\"74208\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"70\",\"CreditName\":\"手术室\",\"AccoutDate\":\"2024-02-2315:29:48\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"31585\",\"materialName\":\"一次性使用鼻氧管(吸氧管)\",\"materialSpec\":\"长单鼻/条\",\"materialUnit\":\"条\",\"batchNo\":65526,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":81,\"importPrc\":1.15,\"importMoney\":93.15,\"factoryCode\":\"0006063576\",\"factoryName\":\"苏州市麦克林医疗器械制品有限公司\"},{\"applyNo\":\"74209\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"92\",\"CreditName\":\"儿科\",\"AccoutDate\":\"2024-02-2315:31:58\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"30936\",\"materialName\":\"一次性静脉输液针51/2\",\"materialSpec\":\"/条\",\"materialUnit\":\"条\",\"batchNo\":64898,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":250,\"importPrc\":0.17,\"importMoney\":42.5,\"factoryCode\":\"0006063565\",\"factoryName\":\"浙江康康\"}],\"total\":4}}";
BaseResponse<PageSimpleResponse<InvResultEntity>> baseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<InvResultEntity>>>() {
});
if (baseResponse.getCode() == 20000) {
List<InvResultEntity> ptxhInvResponses = baseResponse.getData().getList();
List<ThrInvResultResponse> thrInvResultResponses = new ArrayList<>();
if (CollUtil.isNotEmpty(ptxhInvResponses)) {
for (InvResultEntity ptxhInvResponse : ptxhInvResponses) {
ThrInvResultResponse thrInvResultResponse = new ThrInvResultResponse();
thrInvResultResponse.setThrCode(ptxhInvResponse.getMaterialCode());
thrInvResultResponse.setCpmctymc(ptxhInvResponse.getMaterialName());
thrInvResultResponse.setGgxh(ptxhInvResponse.getMaterialSpec());
thrInvResultResponse.setBatchNo(ptxhInvResponse.getBatchNo());
thrInvResultResponse.setMeasname(ptxhInvResponse.getMaterialUnit());
thrInvResultResponse.setPrice(BigDecimal.valueOf(ptxhInvResponse.getImportPrc()));
thrInvResultResponse.setAmount(BigDecimal.valueOf(ptxhInvResponse.getImportMoney()));
// thrInvResultResponse.setDeptName(ptxhInvResponse.getDebitName());
// thrInvResultResponse.setDeptCode(ptxhInvResponse.getDebit());
// thrInvResultResponse.setInvName(ptxhInvResponse.getCreditName());
// thrInvResultResponse.setInvCode(ptxhInvResponse.getCredit());
thrInvResultResponse.setDeptName(ptxhInvResponse.getDebitName());
thrInvResultResponse.setDeptCode("1002");
thrInvResultResponse.setInvName(ptxhInvResponse.getCreditName());
thrInvResultResponse.setInvCode("1000003");
thrInvResultResponse.setManufacturer(ptxhInvResponse.getFactoryName());
thrInvResultResponse.setManufactoryCode(ptxhInvResponse.getFactoryCode());
thrInvResultResponse.setMainAction(ConstantType.TYPE_OUT);
thrInvResultResponse.setBillType(ptxhInvResponse.getIoType());
thrInvResultResponse.setType("1");
thrInvResultResponse.setOutCount(ptxhInvResponse.getQuantity() + "");
thrInvResultResponse.setReCount(ptxhInvResponse.getQuantity() + "");
thrInvResultResponses.add(thrInvResultResponse);
}
}
PageSimpleResponse<ThrInvResultResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(thrInvResultResponses.size() + 0l);
pageSimpleResponse.setList(thrInvResultResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
return baseResponse;
}
@Override
public BaseResponse getInvProducts(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {

@ -0,0 +1,14 @@
package com.glxp.mipsdl.client.ctqyy.entity;
import lombok.Data;
/**
*
*/
@Data
public class InvCodeResultEntity {
}

@ -0,0 +1,27 @@
package com.glxp.mipsdl.client.ctqyy.entity;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
*/
@NoArgsConstructor
@Data
public class InvProjectResultEntity {
private String seqNo;
private String visitNo;
private String sickName;
private String applyDept;
private String deptName;
private String itemCode;
private String itemName;
private Double price;
private Integer quantity;
private Double cost;
private String materialCode;
private String materialName;
private String operTime;
}

@ -0,0 +1,60 @@
package com.glxp.mipsdl.client.ctqyy.entity;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
*/
@NoArgsConstructor
@Data
public class InvResultEntity {
@JsonProperty("applyNo")
private String applyNo;
@JsonProperty("ioFlag")
private String ioFlag;
@JsonProperty("ioType")
private String ioType;
@JsonProperty("ioTypeName")
private String ioTypeName;
@JsonProperty("Debit")
private String debit;
@JsonProperty("DebitName")
private String debitName;
@JsonProperty("Credit")
private String credit;
@JsonProperty("CreditName")
private String creditName;
@JsonProperty("AccoutDate")
private String accoutDate;
@JsonProperty("Accoutant")
private String accoutant;
@JsonProperty("receiveOper")
private String receiveOper;
@JsonProperty("materialCode")
private String materialCode;
@JsonProperty("materialName")
private String materialName;
@JsonProperty("materialSpec")
private String materialSpec;
@JsonProperty("materialUnit")
private String materialUnit;
@JsonProperty("batchNo")
private String batchNo;
@JsonProperty("invoiceNo")
private String invoiceNo;
@JsonProperty("invoiceDate")
private String invoiceDate;
@JsonProperty("quantity")
private Integer quantity;
@JsonProperty("importPrc")
private Double importPrc;
@JsonProperty("importMoney")
private Integer importMoney;
@JsonProperty("factoryCode")
private String factoryCode;
@JsonProperty("factoryName")
private String factoryName;
}

@ -457,12 +457,12 @@ public class PtxhyyClient extends CommonHttpClient {
ThrInvResultResponse thrInvResultResponse = new ThrInvResultResponse();
thrInvResultResponse.setThrCode(ptxhInvResponse.getFyxh());
thrInvResultResponse.setCpmctymc(ptxhInvResponse.getFymc());
thrInvResultResponse.setPrice(ptxhInvResponse.getFydj());
thrInvResultResponse.setPrice(BigDecimal.valueOf(Double.parseDouble(ptxhInvResponse.getFydj())));
thrInvResultResponse.setMeasname(ptxhInvResponse.getDw());
thrInvResultResponse.setDeptName(ptxhInvResponse.getZxks());
thrInvResultResponse.setInvName(ptxhInvResponse.getZxks());
thrInvResultResponse.setType(ptxhInvResponse.getLb());
thrInvResultResponse.setRelCount(ptxhInvResponse.getZsl());
thrInvResultResponse.setReCount(ptxhInvResponse.getZsl());
thrInvResultResponses.add(thrInvResultResponse);
}
}

@ -81,6 +81,12 @@ public interface Constants {
*/
String URI_GET_HSLB = "getHslbUrl";
/**
*
*/
String URL_GET_INV_RESULT = "getInvResultUrl";
//上传数据到UDI管理系统URL名称合集
/**

@ -1,6 +1,7 @@
package com.glxp.mipsdl.controller;
import com.glxp.mipsdl.client.ClientProcessor;
import com.glxp.mipsdl.client.ctqyy.entity.InvProjectResultEntity;
import com.glxp.mipsdl.client.pzh.PzhzdClient;
import com.glxp.mipsdl.req.base.*;
import com.glxp.mipsdl.req.ctqyy.DlThirdProjectRequest;
@ -129,6 +130,18 @@ public class UdiWmsController {
return ClientProcessor.getHttpClient().getInvResult(udiwmsInvProductsRequest);
}
/**
*
*
* @param udiwmsInvProductsRequest
* @return
*/
@PostMapping("/udiwms/erp/inv/getInvCodeResult")
public BaseResponse getInvCodeResult(@RequestBody UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
return ClientProcessor.getHttpClient().getInvCodeResult(udiwmsInvProductsRequest);
}
/**
*
*
@ -136,6 +149,7 @@ public class UdiWmsController {
* @return
*/
@PostMapping("/udiwms/erp/post/product")
public BaseResponse postProduct(@RequestBody UdiwmsAddProductsRequest udiwmsAddProductsRequest) {
return ClientProcessor.getHttpClient().submitProducts(udiwmsAddProductsRequest);
}

@ -0,0 +1,13 @@
package com.glxp.mipsdl.req.ctqyy;
import lombok.Data;
@Data
public class CtqyyInvRequest {
private String startdate;
private String enddate;
private Integer page;
private Integer limit;
}

@ -2,33 +2,159 @@ package com.glxp.mipsdl.res.udiwms;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class ThrInvResultResponse {
private Integer id;
/**
*
*/
private String cpmctymc;
/**
* /
*/
private String thrCode;
/**
* DI
*/
private String nameCode;
/**
*
*/
private String ggxh;
/**
*
*/
private String batchNo;
/**
*
*/
private String measname;
private String price;
/**
*
*/
private BigDecimal price;
/**
*
*/
private String productionDate;
/**
*
*/
private String expireDate;
/**
*
*/
private String ylqxzcrbarmc;
/**
* /
*/
private String zczbhhzbapzbh;
/**
*
*/
private String inCount;
/**
*
*/
private String outCount;
private String relCount;
/**
*
*/
private String supName;
/**
*
*/
private String deptName;
/**
*
*/
private String deptCode;
/**
*
*/
private String invName;
/**
*
*/
private String invCode;
/**
*
*/
private String spaceCode;
/**
*
*/
private String spaceName;
/**
*
*/
private String mainAction;
/**
*
*/
private String manufacturer;
/**
*
*/
private String manufactoryCode;
/**
*
*/
private String remark;
/**
*
*/
private String billType;
/**
*
*/
private String reCount;
/**
*
*/
private String type;
/**
*
*/
private BigDecimal amount;
/**
* UDI
*/
private String udiCode;
}

Loading…
Cancel
Save