字典未对照单据异常

scpwxyy
zane 7 months ago
parent 01659fb496
commit 4ada4ee62a

@ -1366,9 +1366,7 @@ public class CtqyyClient extends CommonHttpClient {
public BaseResponse getPrescribes(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest) {
LambdaQueryWrapper<VYpzsPresInfo> wrapper = new LambdaQueryWrapper<>();
String code = udiwmsBasicSkPrescribeRequest.getCode();
if (StrUtil.isNotEmpty(code)) {
wrapper.or().eq(VYpzsPresInfo::getSTOOUT_NO, code).or().eq(VYpzsPresInfo::getPRESCRIBE_NUMBER, code);
}
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);
@ -1519,11 +1517,14 @@ public class CtqyyClient extends CommonHttpClient {
List<IoCollectOrder> ioCollectOrders = new ArrayList<>();
groupedByPrescribeNumber.forEach((key, value) -> {
VYpzsPresInfo presInfoEntity = value.get(0);
StringBuilder errorMsg = new StringBuilder();
IoCollectOrder ioCollectOrder = new IoCollectOrder();
ioCollectOrder.setBillNo(presInfoEntity.getPRESCRIBE_NUMBER());
ioCollectOrder.setFromType("HIS系统");
ioCollectOrder.setFromCorp(presInfoEntity.getSICK_ID());
ioCollectOrder.setWorkPlaceCode(udiwmsBasicSkPrescribeRequest.getWorkPlaceCode());
ioCollectOrder.setFromCorpName("");
ioCollectOrder.setWorkPlaceCode(Long.valueOf(udiwmsBasicSkPrescribeRequest.getWorkPlaceCode()));
Date date = DateUtil.parseDate(presInfoEntity.getLAY_TIME());
ioCollectOrder.setBillTime(date);
ioCollectOrder.setCreateTime(new Date());
@ -1533,17 +1534,18 @@ public class CtqyyClient extends CommonHttpClient {
ioCollectOrder.setSplitStatus(0);
ioCollectOrder.setTagStatus(0);
List<IoCollectOrderBiz> bizList = new ArrayList<>();
value.forEach(entity ->
{
value.forEach(entity -> {
IoCollectOrderBiz collectOrderBiz = new IoCollectOrderBiz();
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper<BasicUdirelEntity>().eq(BasicUdirelEntity::getMainId, entity.getPHYSIC_CODE()));
if (basicUdirelEntity != null) {
collectOrderBiz.setRelId(basicUdirelEntity.getId());
}else {
errorMsg.append(entity.getPHYSIC_NAME()).append("字典未对照").append(";");
}
collectOrderBiz.setThrCode(entity.getPHYSIC_CODE());
collectOrderBiz.setCpmctymc(entity.getPHYSIC_NAME());
collectOrderBiz.setGgxh(entity.getPACK_SPEC());
collectOrderBiz.setBatchNo("");
collectOrderBiz.setBatchNo(entity.getBATCH_NUMBER());
collectOrderBiz.setOrderIdFk(ioCollectOrder.getBillNo());
collectOrderBiz.setCount(Integer.parseInt(entity.getLAY_PHYSIC_QUANTITY()));
collectOrderBiz.setMeasureUnit(entity.getPHYSIC_UNIT());
@ -1551,6 +1553,10 @@ public class CtqyyClient extends CommonHttpClient {
collectOrderBiz.setUnTagCount(0);
bizList.add(collectOrderBiz);
});
if(StrUtil.isNotBlank(errorMsg)){
ioCollectOrder.setErrorMsg(errorMsg.toString());
ioCollectOrder.setTagStatus(4);
}
ioCollectOrder.setBizList(bizList);
ioCollectOrders.add(ioCollectOrder);
});

@ -57,6 +57,9 @@ public class IoCollectOrder implements Serializable {
@TableField(value = "fromCorpName")
private String fromCorpName;
/**
*
*/
@ -191,6 +194,14 @@ public class IoCollectOrder implements Serializable {
@TableField(value = "invAlert")
private Integer invAlert;
/**
*
*/
@TableField(value = "errorMsg")
private String errorMsg;
@TableField(exist = false)
private List<CollectOrderBizResponse> collectOrderBizResponseList;

Loading…
Cancel
Save