|
|
|
@ -54,10 +54,7 @@ import com.glxp.mipsdl.service.order.OrderUploadLogService;
|
|
|
|
|
import com.glxp.mipsdl.service.system.SysParamConfigService;
|
|
|
|
|
import com.glxp.mipsdl.service.thrsys.ThrCorpService;
|
|
|
|
|
import com.glxp.mipsdl.service.thrsys.ThrSystemDetailService;
|
|
|
|
|
import com.glxp.mipsdl.thirddao.ctqyy.VYpzsIoInfoMapper;
|
|
|
|
|
import com.glxp.mipsdl.thirddao.ctqyy.VYpzsPhysicDictMapper;
|
|
|
|
|
import com.glxp.mipsdl.thirddao.ctqyy.VYpzsPlanInfoMapper;
|
|
|
|
|
import com.glxp.mipsdl.thirddao.ctqyy.VYpzsPresInfoMapper;
|
|
|
|
|
import com.glxp.mipsdl.thirddao.ctqyy.*;
|
|
|
|
|
import com.glxp.mipsdl.util.*;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.dom4j.Document;
|
|
|
|
@ -1358,6 +1355,13 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
return udiwmsPreInOrderRequest;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
VInsurNationGoodsPhysicMapper goodsPhysicMapper;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
VInsurNationGoodsReturnMapper vInsurNationGoodsReturnMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
VYpzsPresInfoReturnMapper vYpzsPresInfoReturnMapper;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 处方拉取视图
|
|
|
|
@ -1367,55 +1371,21 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public BaseResponse getPrescribes(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest) {
|
|
|
|
|
LambdaQueryWrapper<VYpzsPresInfo> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
String code = udiwmsBasicSkPrescribeRequest.getCode();
|
|
|
|
|
wrapper.and(StrUtil.isNotEmpty(code), t -> t.eq(VYpzsPresInfo::getSTOOUT_NO, code).or().eq(VYpzsPresInfo::getPRESCRIBE_NUMBER, code));
|
|
|
|
|
//补充其他查询条件
|
|
|
|
|
IPage<VYpzsPresInfo> page = vYpzsPresInfoMapper
|
|
|
|
|
.selectPage(new Page<VYpzsPresInfo>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()), wrapper);
|
|
|
|
|
// List<VYpzsPresInfo> presInfoEntities = page.getRecords();
|
|
|
|
|
// if (CollUtil.isNotEmpty(presInfoEntities)) {
|
|
|
|
|
// //数据处理以basic_sk_prescribe,basic_sk_prescribe_item 主子返回
|
|
|
|
|
// Map<String, List<VYpzsPresInfo>> groupedByPrescribeNumber = presInfoEntities.stream()
|
|
|
|
|
// .collect(Collectors.groupingBy(VYpzsPresInfo::getPRESCRIBE_NUMBER));
|
|
|
|
|
// List<BasicSkPrescribeResponse> basicSkPrescribeResponses = new ArrayList<>();
|
|
|
|
|
// List<BasicSkPrescribeResponse> finalBasicSkPrescribeResponses = basicSkPrescribeResponses;
|
|
|
|
|
// groupedByPrescribeNumber.forEach((key, value) -> {
|
|
|
|
|
// VYpzsPresInfo presInfoEntity = value.get(0);
|
|
|
|
|
// BasicSkPrescribeResponse basicSkPrescribeResponse = new BasicSkPrescribeResponse();
|
|
|
|
|
// basicSkPrescribeResponse.setSickCode(presInfoEntity.getSICK_ID());
|
|
|
|
|
// basicSkPrescribeResponse.setCode(presInfoEntity.getPRESCRIBE_NUMBER());
|
|
|
|
|
// basicSkPrescribeResponse.setStooutNo(presInfoEntity.getSTOOUT_NO());
|
|
|
|
|
// basicSkPrescribeResponse.setAddr("YPCF002");
|
|
|
|
|
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
// LocalDateTime dateTime = LocalDateTime.parse(presInfoEntity.getLAY_TIME(), formatter);
|
|
|
|
|
// basicSkPrescribeResponse.setPrescribeDate(dateTime);
|
|
|
|
|
// List<BasicSkPrescribeItemEntity> itemList = new ArrayList<>();
|
|
|
|
|
// value.forEach(entity ->
|
|
|
|
|
// {
|
|
|
|
|
// BasicSkPrescribeItemEntity basicSkPrescribeItemEntity = new BasicSkPrescribeItemEntity();
|
|
|
|
|
// basicSkPrescribeItemEntity.setItemCode(entity.getPHYSIC_CODE());
|
|
|
|
|
// BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper<BasicUdirelEntity>().eq(BasicUdirelEntity::getMainId, entity.getPHYSIC_CODE()));
|
|
|
|
|
// if (basicUdirelEntity != null) {
|
|
|
|
|
// basicSkPrescribeItemEntity.setRelId(basicUdirelEntity.getId());
|
|
|
|
|
// }
|
|
|
|
|
// basicSkPrescribeItemEntity.setItemName(entity.getPHYSIC_NAME());
|
|
|
|
|
// basicSkPrescribeItemEntity.setGgxh(entity.getPACK_SPEC());
|
|
|
|
|
// basicSkPrescribeItemEntity.setMeasureCount(entity.getLAY_PHYSIC_QUANTITY());
|
|
|
|
|
// basicSkPrescribeItemEntity.setMeasureUnit(entity.getPHYSIC_UNIT());
|
|
|
|
|
// itemList.add(basicSkPrescribeItemEntity);
|
|
|
|
|
// });
|
|
|
|
|
// basicSkPrescribeResponse.setItemList(itemList);
|
|
|
|
|
// finalBasicSkPrescribeResponses.add(basicSkPrescribeResponse);
|
|
|
|
|
// });
|
|
|
|
|
// PageSimpleResponse<BasicSkPrescribeResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
// pageSimpleResponse.setTotal(page.getTotal());
|
|
|
|
|
// pageSimpleResponse.setList(basicSkPrescribeResponses);
|
|
|
|
|
// return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
// } else {
|
|
|
|
|
// return ResultVOUtils.error(500, "下载失败!");
|
|
|
|
|
// }
|
|
|
|
|
return this.ioCollectOrder(udiwmsBasicSkPrescribeRequest, page);
|
|
|
|
|
if (IntUtil.value(udiwmsBasicSkPrescribeRequest.getInOutType()) == 0) {
|
|
|
|
|
LambdaQueryWrapper<VInsurNationGoodsPhysic> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
String code = udiwmsBasicSkPrescribeRequest.getCode();
|
|
|
|
|
wrapper.and(StrUtil.isNotEmpty(code), t -> t.eq(VInsurNationGoodsPhysic::getSTOOUT_NO, code).or().eq(VInsurNationGoodsPhysic::getRXNO, code));
|
|
|
|
|
IPage<VInsurNationGoodsPhysic> page = goodsPhysicMapper
|
|
|
|
|
.selectPage(new Page<VInsurNationGoodsPhysic>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()), wrapper);
|
|
|
|
|
return this.covertSellOrder(udiwmsBasicSkPrescribeRequest, page);
|
|
|
|
|
} else {
|
|
|
|
|
LambdaQueryWrapper<VInsurNationGoodsReturn> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
String code = udiwmsBasicSkPrescribeRequest.getCode();
|
|
|
|
|
wrapper.and(StrUtil.isNotEmpty(code), t -> t.eq(VInsurNationGoodsReturn::getAPPLY_NO, code));
|
|
|
|
|
IPage<VInsurNationGoodsReturn> page = vInsurNationGoodsReturnMapper
|
|
|
|
|
.selectPage(new Page<VInsurNationGoodsReturn>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()), wrapper);
|
|
|
|
|
return this.covertReturnOrder(udiwmsBasicSkPrescribeRequest, page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1491,7 +1461,7 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
List<IoCollectOrder> ioCollectOrders = new ArrayList<>();
|
|
|
|
|
if (CollUtil.isNotEmpty(ioInfos)) {
|
|
|
|
|
Map<String, List<VYpzsIoInfo>> groupedByPhysicCode = ioInfos.stream()
|
|
|
|
|
.collect(Collectors.groupingBy(VYpzsIoInfo::getPHYSIC_CODE));
|
|
|
|
|
.collect(Collectors.groupingBy(VYpzsIoInfo::getRECEIPT_NUMBER));
|
|
|
|
|
groupedByPhysicCode.forEach((key, value) -> {
|
|
|
|
|
VYpzsIoInfo info = value.get(0);
|
|
|
|
|
StringBuilder errorMsg = new StringBuilder();
|
|
|
|
@ -1521,7 +1491,7 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
collectOrderBiz.setBatchNo(entity.getBATCH_NO());
|
|
|
|
|
collectOrderBiz.setCount(entity.getQUANTITY());
|
|
|
|
|
collectOrderBiz.setYbbm(entity.getCOUNTRY_CODE());
|
|
|
|
|
collectOrderBiz.setOrderIdFk(info.getPHYSIC_CODE());
|
|
|
|
|
collectOrderBiz.setOrderIdFk(ioCollectOrder.getBillNo());
|
|
|
|
|
collectOrderBiz.setMeasureUnit(entity.getPACK_UNIT1());
|
|
|
|
|
collectOrderBiz.setGgxh(entity.getPACK_SPEC() + ":" + entity.getPHYSIC_UNIT());
|
|
|
|
|
collectOrderBiz.setTagStatus(1);
|
|
|
|
@ -1544,102 +1514,115 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 中间表
|
|
|
|
|
* 单据
|
|
|
|
|
*
|
|
|
|
|
* @param udiwmsBasicSkPrescribeRequest
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
private BaseResponse basicSkPrescribe(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest, IPage<VYpzsPresInfo> page) {
|
|
|
|
|
List<VYpzsPresInfo> presInfoEntities = page.getRecords();
|
|
|
|
|
private BaseResponse covertSellOrder(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest, IPage<VInsurNationGoodsPhysic> page) {
|
|
|
|
|
List<VInsurNationGoodsPhysic> presInfoEntities = page.getRecords();
|
|
|
|
|
if (CollUtil.isNotEmpty(presInfoEntities)) {
|
|
|
|
|
//数据处理以basic_sk_prescribe,basic_sk_prescribe_item 主子返回
|
|
|
|
|
Map<String, List<VYpzsPresInfo>> groupedByPrescribeNumber = presInfoEntities.stream()
|
|
|
|
|
.collect(Collectors.groupingBy(VYpzsPresInfo::getPRESCRIBE_NUMBER));
|
|
|
|
|
List<BasicSkPrescribeResponse> basicSkPrescribeResponses = new ArrayList<>();
|
|
|
|
|
List<BasicSkPrescribeResponse> finalBasicSkPrescribeResponses = basicSkPrescribeResponses;
|
|
|
|
|
Map<String, List<VInsurNationGoodsPhysic>> groupedByPrescribeNumber = presInfoEntities.stream()
|
|
|
|
|
.collect(Collectors.groupingBy(VInsurNationGoodsPhysic::getRXNO));
|
|
|
|
|
List<IoCollectOrder> ioCollectOrders = new ArrayList<>();
|
|
|
|
|
groupedByPrescribeNumber.forEach((key, value) -> {
|
|
|
|
|
VYpzsPresInfo presInfoEntity = value.get(0);
|
|
|
|
|
BasicSkPrescribeResponse basicSkPrescribeResponse = new BasicSkPrescribeResponse();
|
|
|
|
|
basicSkPrescribeResponse.setSickCode(presInfoEntity.getSICK_ID());
|
|
|
|
|
basicSkPrescribeResponse.setCode(presInfoEntity.getPRESCRIBE_NUMBER());
|
|
|
|
|
basicSkPrescribeResponse.setStooutNo(presInfoEntity.getSTOOUT_NO());
|
|
|
|
|
basicSkPrescribeResponse.setAddr("YPCF002");
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
LocalDateTime dateTime = LocalDateTime.parse(presInfoEntity.getLAY_TIME(), formatter);
|
|
|
|
|
basicSkPrescribeResponse.setPrescribeDate(dateTime);
|
|
|
|
|
List<BasicSkPrescribeItemEntity> itemList = new ArrayList<>();
|
|
|
|
|
value.forEach(entity ->
|
|
|
|
|
{
|
|
|
|
|
BasicSkPrescribeItemEntity basicSkPrescribeItemEntity = new BasicSkPrescribeItemEntity();
|
|
|
|
|
basicSkPrescribeItemEntity.setItemCode(entity.getPHYSIC_CODE());
|
|
|
|
|
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper<BasicUdirelEntity>().eq(BasicUdirelEntity::getMainId, entity.getPHYSIC_CODE()));
|
|
|
|
|
VInsurNationGoodsPhysic presInfoEntity = value.get(0);
|
|
|
|
|
StringBuilder errorMsg = new StringBuilder();
|
|
|
|
|
IoCollectOrder ioCollectOrder = new IoCollectOrder();
|
|
|
|
|
ioCollectOrder.setBillNo(presInfoEntity.getRXNO());
|
|
|
|
|
ioCollectOrder.setFromType("HIS系统");
|
|
|
|
|
ioCollectOrder.setFromCorp(presInfoEntity.getSICK_ID());
|
|
|
|
|
ioCollectOrder.setWorkPlaceCode(udiwmsBasicSkPrescribeRequest.getWorkPlaceCode());
|
|
|
|
|
ioCollectOrder.setFromCorpName(presInfoEntity.getPSN_NAME());
|
|
|
|
|
Date date = DateUtil.parseDate(presInfoEntity.getSEL_RETN_TIME());
|
|
|
|
|
ioCollectOrder.setBillTime(date);
|
|
|
|
|
ioCollectOrder.setCreateTime(new Date());
|
|
|
|
|
ioCollectOrder.setCreateUser(udiwmsBasicSkPrescribeRequest.getCreateUser());
|
|
|
|
|
ioCollectOrder.setBackupOrderRemark1(presInfoEntity.getSTOOUT_NO());
|
|
|
|
|
ioCollectOrder.setUpdateTime(new Date());
|
|
|
|
|
ioCollectOrder.setSplitStatus(0);
|
|
|
|
|
ioCollectOrder.setTagStatus(0);
|
|
|
|
|
List<IoCollectOrderBiz> bizList = new ArrayList<>();
|
|
|
|
|
value.forEach(entity -> {
|
|
|
|
|
IoCollectOrderBiz collectOrderBiz = new IoCollectOrderBiz();
|
|
|
|
|
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper<BasicUdirelEntity>().eq(BasicUdirelEntity::getMainId, entity.getFIXMEDINS_HILIST_ID()));
|
|
|
|
|
if (basicUdirelEntity != null) {
|
|
|
|
|
basicSkPrescribeItemEntity.setRelId(basicUdirelEntity.getId());
|
|
|
|
|
collectOrderBiz.setRelId(basicUdirelEntity.getId());
|
|
|
|
|
} else {
|
|
|
|
|
errorMsg.append(entity.getFIXMEDINS_HILIST_NAME()).append("字典未对照").append(";");
|
|
|
|
|
}
|
|
|
|
|
basicSkPrescribeItemEntity.setItemName(entity.getPHYSIC_NAME());
|
|
|
|
|
basicSkPrescribeItemEntity.setGgxh(entity.getPACK_SPEC());
|
|
|
|
|
basicSkPrescribeItemEntity.setMeasureCount(entity.getLAY_PHYSIC_QUANTITY());
|
|
|
|
|
basicSkPrescribeItemEntity.setMeasureUnit(entity.getPHYSIC_UNIT());
|
|
|
|
|
itemList.add(basicSkPrescribeItemEntity);
|
|
|
|
|
|
|
|
|
|
VYpzsPresInfo vYpzsPresInfo = vYpzsPresInfoMapper.selectOne(new LambdaQueryWrapper<VYpzsPresInfo>().eq(VYpzsPresInfo::getPRESCRIBE_NUMBER, entity.getRXNO()).eq(VYpzsPresInfo::getPHYSIC_CODE, entity.getFIXMEDINS_HILIST_ID()));
|
|
|
|
|
collectOrderBiz.setThrCode(entity.getFIXMEDINS_HILIST_ID());
|
|
|
|
|
collectOrderBiz.setCpmctymc(entity.getFIXMEDINS_HILIST_NAME());
|
|
|
|
|
collectOrderBiz.setGgxh(vYpzsPresInfo.getPACK_SPEC());
|
|
|
|
|
// collectOrderBiz.setBatchNo(entity.getBATCH_NUMBER());
|
|
|
|
|
collectOrderBiz.setOrderIdFk(ioCollectOrder.getBillNo());
|
|
|
|
|
collectOrderBiz.setYbbm(entity.getMED_LIST_CODG());
|
|
|
|
|
collectOrderBiz.setCount(Integer.parseInt(vYpzsPresInfo.getLAY_PHYSIC_QUANTITY()));
|
|
|
|
|
collectOrderBiz.setMeasureUnit(vYpzsPresInfo.getPHYSIC_UNIT());
|
|
|
|
|
collectOrderBiz.setTagStatus(1);
|
|
|
|
|
collectOrderBiz.setUnTagCount(0);
|
|
|
|
|
bizList.add(collectOrderBiz);
|
|
|
|
|
});
|
|
|
|
|
basicSkPrescribeResponse.setItemList(itemList);
|
|
|
|
|
finalBasicSkPrescribeResponses.add(basicSkPrescribeResponse);
|
|
|
|
|
if (StrUtil.isNotBlank(errorMsg)) {
|
|
|
|
|
ioCollectOrder.setErrorMsg(errorMsg.toString());
|
|
|
|
|
ioCollectOrder.setTagStatus(4);
|
|
|
|
|
}
|
|
|
|
|
ioCollectOrder.setBizList(bizList);
|
|
|
|
|
ioCollectOrders.add(ioCollectOrder);
|
|
|
|
|
});
|
|
|
|
|
PageSimpleResponse<BasicSkPrescribeResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
PageSimpleResponse<IoCollectOrder> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
pageSimpleResponse.setTotal(page.getTotal());
|
|
|
|
|
pageSimpleResponse.setList(basicSkPrescribeResponses);
|
|
|
|
|
pageSimpleResponse.setList(ioCollectOrders);
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "下载失败!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 单据
|
|
|
|
|
*
|
|
|
|
|
* @param udiwmsBasicSkPrescribeRequest
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
private BaseResponse ioCollectOrder(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest, IPage<VYpzsPresInfo> page) {
|
|
|
|
|
List<VYpzsPresInfo> presInfoEntities = page.getRecords();
|
|
|
|
|
private BaseResponse covertReturnOrder(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest, IPage<VInsurNationGoodsReturn> page) {
|
|
|
|
|
List<VInsurNationGoodsReturn> presInfoEntities = page.getRecords();
|
|
|
|
|
if (CollUtil.isNotEmpty(presInfoEntities)) {
|
|
|
|
|
//数据处理以io_collect_order,io_collect_order_biz 主子返回
|
|
|
|
|
Map<String, List<VYpzsPresInfo>> groupedByPrescribeNumber = presInfoEntities.stream()
|
|
|
|
|
.collect(Collectors.groupingBy(VYpzsPresInfo::getPRESCRIBE_NUMBER));
|
|
|
|
|
Map<String, List<VInsurNationGoodsReturn>> groupedByPrescribeNumber = presInfoEntities.stream()
|
|
|
|
|
.collect(Collectors.groupingBy(VInsurNationGoodsReturn::getAPPLY_NO));
|
|
|
|
|
List<IoCollectOrder> ioCollectOrders = new ArrayList<>();
|
|
|
|
|
groupedByPrescribeNumber.forEach((key, value) -> {
|
|
|
|
|
VYpzsPresInfo presInfoEntity = value.get(0);
|
|
|
|
|
VInsurNationGoodsReturn presInfoEntity = value.get(0);
|
|
|
|
|
StringBuilder errorMsg = new StringBuilder();
|
|
|
|
|
IoCollectOrder ioCollectOrder = new IoCollectOrder();
|
|
|
|
|
ioCollectOrder.setBillNo(presInfoEntity.getPRESCRIBE_NUMBER());
|
|
|
|
|
ioCollectOrder.setBillNo(presInfoEntity.getAPPLY_NO());
|
|
|
|
|
ioCollectOrder.setFromType("HIS系统");
|
|
|
|
|
ioCollectOrder.setFromCorp(presInfoEntity.getSICK_ID());
|
|
|
|
|
ioCollectOrder.setWorkPlaceCode(udiwmsBasicSkPrescribeRequest.getWorkPlaceCode());
|
|
|
|
|
ioCollectOrder.setFromCorpName("");
|
|
|
|
|
Date date = DateUtil.parseDate(presInfoEntity.getLAY_TIME());
|
|
|
|
|
ioCollectOrder.setFromCorpName(presInfoEntity.getPSN_NAME());
|
|
|
|
|
Date date = DateUtil.parseDate(presInfoEntity.getSEL_RETN_TIME());
|
|
|
|
|
ioCollectOrder.setBillTime(date);
|
|
|
|
|
ioCollectOrder.setCreateTime(new Date());
|
|
|
|
|
ioCollectOrder.setCreateUser(udiwmsBasicSkPrescribeRequest.getCreateUser());
|
|
|
|
|
ioCollectOrder.setBackupOrderRemark1(presInfoEntity.getSTOOUT_NO());
|
|
|
|
|
ioCollectOrder.setUpdateTime(new Date());
|
|
|
|
|
ioCollectOrder.setSplitStatus(0);
|
|
|
|
|
ioCollectOrder.setTagStatus(0);
|
|
|
|
|
List<IoCollectOrderBiz> bizList = new ArrayList<>();
|
|
|
|
|
value.forEach(entity -> {
|
|
|
|
|
IoCollectOrderBiz collectOrderBiz = new IoCollectOrderBiz();
|
|
|
|
|
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper<BasicUdirelEntity>().eq(BasicUdirelEntity::getMainId, entity.getPHYSIC_CODE()));
|
|
|
|
|
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper<BasicUdirelEntity>().eq(BasicUdirelEntity::getMainId, entity.getFIXMEDINS_HILIST_ID()));
|
|
|
|
|
if (basicUdirelEntity != null) {
|
|
|
|
|
collectOrderBiz.setRelId(basicUdirelEntity.getId());
|
|
|
|
|
} else {
|
|
|
|
|
errorMsg.append(entity.getPHYSIC_NAME()).append("字典未对照").append(";");
|
|
|
|
|
errorMsg.append(entity.getFIXMEDINS_HILIST_NAME()).append("字典未对照").append(";");
|
|
|
|
|
}
|
|
|
|
|
VYpzsPresInfoReturn vYpzsPresInfo = vYpzsPresInfoReturnMapper.selectOne(new LambdaQueryWrapper<VYpzsPresInfoReturn>().eq(VYpzsPresInfoReturn::getAPPLY_NO, entity.getAPPLY_NO()).eq(VYpzsPresInfoReturn::getPHYSIC_CODE, entity.getFIXMEDINS_HILIST_ID()));
|
|
|
|
|
if (vYpzsPresInfo != null) {
|
|
|
|
|
collectOrderBiz.setGgxh(vYpzsPresInfo.getPHYSIC_SPEC());
|
|
|
|
|
collectOrderBiz.setMeasureUnit(vYpzsPresInfo.getPHYSIC_UNIT());
|
|
|
|
|
}
|
|
|
|
|
collectOrderBiz.setThrCode(entity.getPHYSIC_CODE());
|
|
|
|
|
collectOrderBiz.setCpmctymc(entity.getPHYSIC_NAME());
|
|
|
|
|
collectOrderBiz.setGgxh(entity.getPACK_SPEC());
|
|
|
|
|
collectOrderBiz.setThrCode(entity.getFIXMEDINS_HILIST_ID());
|
|
|
|
|
collectOrderBiz.setCpmctymc(entity.getFIXMEDINS_HILIST_NAME());
|
|
|
|
|
// collectOrderBiz.setBatchNo(entity.getBATCH_NUMBER());
|
|
|
|
|
collectOrderBiz.setOrderIdFk(ioCollectOrder.getBillNo());
|
|
|
|
|
collectOrderBiz.setCount(Integer.parseInt(entity.getLAY_PHYSIC_QUANTITY()));
|
|
|
|
|
collectOrderBiz.setMeasureUnit(entity.getPHYSIC_UNIT());
|
|
|
|
|
collectOrderBiz.setYbbm(entity.getMED_LIST_CODG());
|
|
|
|
|
collectOrderBiz.setCount(entity.getSEL_RETN_CNT());
|
|
|
|
|
collectOrderBiz.setTagStatus(1);
|
|
|
|
|
collectOrderBiz.setUnTagCount(0);
|
|
|
|
|
bizList.add(collectOrderBiz);
|
|
|
|
@ -1660,5 +1643,4 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|