科室上货转销售出库

dev_2.5_ocean
yewj 4 months ago
parent a2614cc1fd
commit e55bf7cc29

@ -159,7 +159,7 @@ public class CollectOrderRequest extends ListPageRequest {
private List<Integer> uploadStatusList;
/**
*
*
*/
private Boolean forceAllot;

@ -57,13 +57,13 @@ public class IoCollectCodeService extends ServiceImpl<IoCollectCodeMapper, IoCol
*
*/
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
public void insertCodesByBill(String billNo,Integer isCheckFinish) {
public void insertCodesByBill(String billNo, Integer isCheckFinish) {
IoCollectOrder collectOrder = collectOrderService.getByBillNo(billNo);
CollectOrderBizRequest collectOrderBizRequest = new CollectOrderBizRequest();
collectOrderBizRequest.setOrderIdFk(billNo);
if (isCheckFinish != null){
if (isCheckFinish != null) {
collectOrderBizRequest.setIsOrderCheck(isCheckFinish);
}

@ -271,7 +271,8 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
}
}
List<IoOrderResponse> list = orderService.filterList(filterOrderRequest);
List<IoCollectOrder> allotCollects = new ArrayList<>();
List<IoCollectOrderBiz> allotCollectBizs = new ArrayList<>();
if (list == null) {
return ResultVOUtils.error(500, "未查到此业务单据");
}
@ -292,7 +293,9 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
shipperName = ioOrderEntity.getDeptName();
fromCorpName = ioOrderEntity.getFromName();
}
IoCollectOrder collectOrder = IoCollectOrder.builder().billNo(ioOrderEntity.getBillNo()).fromType("药械追溯管理系统").busType(ioOrderEntity.getAction()).fromCorp(ioOrderEntity.getFromName()).fromCorpName(fromCorpName).billTime(ioOrderEntity.getCreateTime()).shipperName(shipperName).createTime(ioOrderEntity.getCreateTime()).createUser(ioOrderEntity.getCreateUser()).updateTime(new Date()).orderCirType(sysWorkplaceDocumentEntity.getOrderCirType()).splitStatus(0).tagStatus(1).remark(ioOrderEntity.getRemark()).build();
IoCollectOrder collectOrder = IoCollectOrder.builder()
.workPlaceCode(ioOrderEntity.getWorkPlaceCode())
.billNo(ioOrderEntity.getBillNo()).fromType("药械追溯管理系统").busType(ioOrderEntity.getAction()).fromCorp(ioOrderEntity.getFromName()).fromCorpName(fromCorpName).billTime(ioOrderEntity.getCreateTime()).shipperName(shipperName).createTime(ioOrderEntity.getCreateTime()).createUser(ioOrderEntity.getCreateUser()).updateTime(new Date()).orderCirType(sysWorkplaceDocumentEntity.getOrderCirType()).splitStatus(0).tagStatus(1).remark(ioOrderEntity.getRemark()).build();
if (collectOrder.getWorkPlaceCode() != null) {
collectOrder.setTagStatus(1);
}
@ -342,7 +345,19 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
}
collectOrderCodeManService.saveBatch(collectOrderCodeManList);
}
// if (!collectOrder.getTagStatus().equals(4) &&)) {//没出现耗材不匹配 且 开启了自动转成待处理单据
// collectOrder.setTagStatus(1);
// allotCollects.add(collectOrder);
// allotCollectBizs.addAll(bizList);
// }
}
if (CollUtil.isNotEmpty(allotCollects)) {
saveBatch(allotCollects);
collectOrderBizService.saveBatch(allotCollectBizs);
}
return ResultVOUtils.success("下载成功");
}
@ -699,7 +714,6 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
} else {
splitCodeService.finishAutoTagCode(collectOrder, isAuto, collectOrderRequest.getQueueCode());
}
}
//插入备用表
@ -722,7 +736,6 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
if (IntUtil.value(sysWorkplaceDocumentEntity.getIsMatching()) == 1 && sysWorkplaceDocumentEntity.getScanType() != 1) {
ioCollectOrderBackupService.updateSpmsOrder(collectOrderRequest.getBillNo(), authAdmin);
}
}
@ -749,7 +762,6 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
//删除原来单据
removeOrderByBillNo(collectOrder);
ThreadUtil.execAsync(() -> {
//插入到码表
collectCodeService.insertCodesByBill(collectOrderRequest.getBillNo(), null);

@ -14,6 +14,7 @@ import com.glxp.api.service.collect.IoCollectOriginService;
import com.glxp.api.service.collect.IoCollectSetService;
import com.glxp.api.util.MsDateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.EnableScheduling;
@ -82,7 +83,7 @@ public class AsyncIoCollectOrderDownloadTask implements SchedulingConfigurer {
try {
collectOriginService.downloadOrderV2(collectOrderRequest);
} catch (Exception e) {
log.error("自动下载原始单据出错:{}", e.getMessage());
log.error("自动下载原始单据出错:{}", ExceptionUtils.getStackTrace(e));
}
}
}

Loading…
Cancel
Save