|
|
|
@ -64,6 +64,7 @@ import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
@ -776,6 +777,7 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
return baseResponse;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取库存扫码出入库明细(高值耗材出库明细)
|
|
|
|
|
*
|
|
|
|
@ -792,9 +794,15 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem"));
|
|
|
|
|
ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(ptxhyyInvRequest));
|
|
|
|
|
|
|
|
|
|
String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_GET_INV_RESULT), ctqyyRequest);
|
|
|
|
|
// String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_GET_INV_RESULT), ctqyyRequest);
|
|
|
|
|
// String response =
|
|
|
|
|
// "{\"code\": 20000,\"message\": \"success\",\"data\": {\"list\": [{\"recordNo\": 391,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63374\",\"materialName\": \"调节杠\",\"materialPrc\": 2100,\"dictBarcode\": \"0106971221560052\",\"Barcode\": \"111704022117000188340055\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 390,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63374\",\"materialName\": \"调节杠\",\"materialPrc\": 2100,\"dictBarcode\": \"0106946149100093\",\"Barcode\": \"111704022117000188340007\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 408,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63182\",\"materialName\": \"椎弓根螺钉\",\"materialPrc\": 4000,\"dictBarcode\": \"0106938695502193\",\"Barcode\": \"111703012117000076800035\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 401,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63186\",\"materialName\": \"椎弓根螺钉\",\"materialPrc\": 4000,\"dictBarcode\": \"0106938695522023\",\"Barcode\": \"111612212116120902040009\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 423,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63186\",\"materialName\": \"椎弓根螺钉\",\"materialPrc\": 4000,\"dictBarcode\": \"0106938695525055\",\"Barcode\": \"111701062116122700670005\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 400,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63186\",\"materialName\": \"椎弓根螺钉\",\"materialPrc\": 4000,\"dictBarcode\": \"0106921814249918\",\"Barcode\": \"111612212116120902040047\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 422,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63186\",\"materialName\": \"椎弓根螺钉\",\"materialPrc\": 4000,\"dictBarcode\": \"0106921814249918\",\"Barcode\": \"111701062116122700670013\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"}],\"total\": 7}}";
|
|
|
|
|
String response = null;
|
|
|
|
|
try {
|
|
|
|
|
response = FileUtils.getFileContent("E://ghresponse.json");
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
BaseResponse<PageSimpleResponse<InvCodeResultEntity>> baseResponse =
|
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<InvCodeResultEntity>>>() {
|
|
|
|
|
});
|
|
|
|
@ -807,15 +815,27 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
thrInvResultResponse.setThrCode(ptxhInvResponse.getMaterialCode());
|
|
|
|
|
thrInvResultResponse.setCpmctymc(ptxhInvResponse.getMaterialName());
|
|
|
|
|
thrInvResultResponse.setPrice(BigDecimal.valueOf(ptxhInvResponse.getMaterialPrc()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
thrInvResultResponse.setInvName(ptxhInvResponse.getDeptName());
|
|
|
|
|
thrInvResultResponse.setInvCode(ptxhInvResponse.getInDept());
|
|
|
|
|
|
|
|
|
|
// AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new LambdaQueryWrapper<AuthWarehouseEntity>().eq(AuthWarehouseEntity::getThirdId, ptxhInvResponse.getInDept()));
|
|
|
|
|
// if (warehouseEntity != null)
|
|
|
|
|
// thrInvResultResponse.setInvCode(warehouseEntity.getCode());
|
|
|
|
|
// else
|
|
|
|
|
// thrInvResultResponse.setInvCode(ptxhInvResponse.getInDept());
|
|
|
|
|
|
|
|
|
|
thrInvResultResponse.setInvCode("1000003");
|
|
|
|
|
thrInvResultResponse.setDeptCode("1002");
|
|
|
|
|
thrInvResultResponse.setSickerCode(ptxhInvResponse.getVisitNo());
|
|
|
|
|
thrInvResultResponse.setSickerName(ptxhInvResponse.getSickName());
|
|
|
|
|
thrInvResultResponse.setBillType("SC71090077430919");
|
|
|
|
|
thrInvResultResponse.setMainAction(ConstantType.TYPE_OUT);
|
|
|
|
|
thrInvResultResponse.setType("1");
|
|
|
|
|
thrInvResultResponse.setOutCount("1");
|
|
|
|
|
thrInvResultResponse.setReCount("1");
|
|
|
|
|
thrInvResultResponse.setUdiCode(ptxhInvResponse.getDictBarcode() + ptxhInvResponse.getBarcode());
|
|
|
|
|
IoCodeEntity codeEntity = codeDao.selectOne(new LambdaQueryWrapper<IoCodeEntity>().eq(IoCodeEntity::getErrUdiCode, ptxhInvResponse.getBarcode()).last("limit 1"));
|
|
|
|
|
thrInvResultResponse.setUdiCode(codeEntity.getCode());
|
|
|
|
|
thrInvResultResponses.add(thrInvResultResponse);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|