feat: 拉取外网单据

dev_no_inv
chenhc 9 months ago committed by qyt
parent 6f324217ba
commit ccddd39dbf

@ -194,6 +194,21 @@ public class IoCodeTempController extends BaseController {
response.setData(collectOrder); response.setData(collectOrder);
return response; return response;
} else { } else {
BaseResponse baseResponse2 = collectOrderService.importSpmsUdi(collectOrderRequest);
if (ResultEnum.SUCCESS.getCode() == baseResponse2.getCode()) {
collectOrder = collectOrderService.unionSearch(null, null, code);
//=============================================//
if (collectOrder != null) {
collectOrder.setWorkPlaceCode(addEnterCodeRequest.getWorkPlaceCode());
collectOrder.setBusType(addEnterCodeRequest.getBusType());
IoCollectOrder ioCollectOrder = new IoCollectOrder();
BeanUtils.copyProperties(collectOrder, ioCollectOrder);
collectOrderService.updateById(ioCollectOrder);
BaseResponse response = ResultVOUtils.error(601, code);
response.setData(collectOrder);
return response;
}
}
BaseResponse response = ResultVOUtils.error(501, baseResponse.getMessage()); BaseResponse response = ResultVOUtils.error(501, baseResponse.getMessage());
response.setData(code); response.setData(code);
return response; return response;

@ -57,6 +57,7 @@ import com.glxp.api.service.auth.SysWorkplaceService;
import com.glxp.api.service.basic.*; import com.glxp.api.service.basic.*;
import com.glxp.api.service.inout.*; import com.glxp.api.service.inout.*;
import com.glxp.api.service.inout.impl.IoCodeService; import com.glxp.api.service.inout.impl.IoCodeService;
import com.glxp.api.service.thrsys.SysWorkplacePutRelService;
import com.glxp.api.util.*; import com.glxp.api.util.*;
import com.glxp.api.util.udi.FilterUdiUtils; import com.glxp.api.util.udi.FilterUdiUtils;
import com.glxp.api.util.udi.UdiCalCountUtil; import com.glxp.api.util.udi.UdiCalCountUtil;
@ -288,10 +289,10 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
String mainAction = ioOrderEntity.getMainAction(); String mainAction = ioOrderEntity.getMainAction();
String fromCorpName = ""; String fromCorpName = "";
String shipperName = ""; String shipperName = "";
if (mainAction.equals(ConstantType.TYPE_PUT)){ if (mainAction.equals(ConstantType.TYPE_PUT)) {
shipperName = ioOrderEntity.getFromName(); shipperName = ioOrderEntity.getFromName();
fromCorpName = ioOrderEntity.getDeptName(); fromCorpName = ioOrderEntity.getDeptName();
}else { } else {
shipperName = ioOrderEntity.getDeptName(); shipperName = ioOrderEntity.getDeptName();
fromCorpName = ioOrderEntity.getFromName(); fromCorpName = ioOrderEntity.getFromName();
} }
@ -315,7 +316,7 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
} }
save(collectOrder); save(collectOrder);
IoCollectOrderOrigin ioCollectOrderOrigin = new IoCollectOrderOrigin(); IoCollectOrderOrigin ioCollectOrderOrigin = new IoCollectOrderOrigin();
BeanUtils.copyProperties(collectOrder,ioCollectOrderOrigin); BeanUtils.copyProperties(collectOrder, ioCollectOrderOrigin);
ioCollectOrderOrigin.setTagStatus(2); ioCollectOrderOrigin.setTagStatus(2);
collectOrderOriginService.saveOrUpdate(ioCollectOrderOrigin); collectOrderOriginService.saveOrUpdate(ioCollectOrderOrigin);
@ -346,7 +347,7 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
} }
collectOrderBizs.add(collectOrderBiz); collectOrderBizs.add(collectOrderBiz);
IoCollectOrderBizOrigin ioCollectOrderBizOrigin = new IoCollectOrderBizOrigin(); IoCollectOrderBizOrigin ioCollectOrderBizOrigin = new IoCollectOrderBizOrigin();
BeanUtils.copyProperties(collectOrderBiz,ioCollectOrderBizOrigin); BeanUtils.copyProperties(collectOrderBiz, ioCollectOrderBizOrigin);
ioCollectOrderBizOrigin.setId(null); ioCollectOrderBizOrigin.setId(null);
collectOrderOriginBizs.add(ioCollectOrderBizOrigin); collectOrderOriginBizs.add(ioCollectOrderBizOrigin);
} }
@ -376,10 +377,10 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
String mainAction = ioOrderEntity.getMainAction(); String mainAction = ioOrderEntity.getMainAction();
String fromCorpName = ""; String fromCorpName = "";
String shipperName = ""; String shipperName = "";
if (mainAction.equals(ConstantType.TYPE_PUT)){ if (mainAction.equals(ConstantType.TYPE_PUT)) {
shipperName = ioOrderEntity.getFromName(); shipperName = ioOrderEntity.getFromName();
fromCorpName = ioOrderEntity.getDeptName(); fromCorpName = ioOrderEntity.getDeptName();
}else { } else {
shipperName = ioOrderEntity.getDeptName(); shipperName = ioOrderEntity.getDeptName();
fromCorpName = ioOrderEntity.getFromName(); fromCorpName = ioOrderEntity.getFromName();
} }
@ -432,13 +433,12 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
} }
PageInfo<IoCollectOrder> pageInfoReturn = new PageInfo<>(ioCollectOrders); PageInfo<IoCollectOrder> pageInfoReturn = new PageInfo<>(ioCollectOrders);
BeanUtils.copyProperties(pageInfo,pageInfoReturn); BeanUtils.copyProperties(pageInfo, pageInfoReturn);
pageInfoReturn.setList(ioCollectOrders); pageInfoReturn.setList(ioCollectOrders);
return ResultVOUtils.success(pageInfoReturn); return ResultVOUtils.success(pageInfoReturn);
} }
public void importPrescribe(List<BasicSkPrescribeEntity> basicSkPrescribeEntities) { public void importPrescribe(List<BasicSkPrescribeEntity> basicSkPrescribeEntities) {
//下载处方 //下载处方
if (CollUtil.isEmpty(basicSkPrescribeEntities)) if (CollUtil.isEmpty(basicSkPrescribeEntities))
@ -714,14 +714,23 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC
.eq(IoCollectOrder::getId, collectOrderRequest.getId()).update(); .eq(IoCollectOrder::getId, collectOrderRequest.getId()).update();
} }
SysWorkplacePutRelService sysWorkplacePutRelService;
public void finishOrder(CollectOrderRequest collectOrderRequest) { public void finishOrder(CollectOrderRequest collectOrderRequest) {
IoCollectOrder collectOrder = new IoCollectOrder(); IoCollectOrder collectOrder = new IoCollectOrder();
BeanUtils.copyProperties(collectOrderRequest, collectOrder); BeanUtils.copyProperties(collectOrderRequest, collectOrder);
collectOrder.setTagStatus(3); collectOrder.setTagStatus(3);
collectOrder.setUpdateTime(new Date()); collectOrder.setUpdateTime(new Date());
// updateByBillNo(collectOrder); // updateByBillNo(collectOrder);
// Long putWorkPlace = null;
// SysWorkplacePutRel sysWorkplacePutRel = sysWorkplacePutRelService.findPutWorkPlace(collectOrder.getWorkPlaceCode(), collectOrder.getBusType());
// if (sysWorkplacePutRel != null) {
// putWorkPlace = sysWorkplacePutRel.getWorkPlaceCode();
// }
splitCodeService.finishAutoTagCode(collectOrder); splitCodeService.finishAutoTagCode(collectOrder);
//插入备用表 //插入备用表
IoCollectOrderBackup ioCollectOrderBackup = new IoCollectOrderBackup(); IoCollectOrderBackup ioCollectOrderBackup = new IoCollectOrderBackup();
BeanUtils.copyProperties(collectOrder, ioCollectOrderBackup); BeanUtils.copyProperties(collectOrder, ioCollectOrderBackup);

@ -19,6 +19,7 @@ import com.glxp.api.entity.collect.IoCollectOrder;
import com.glxp.api.entity.collect.IoCollectOrderBiz; import com.glxp.api.entity.collect.IoCollectOrderBiz;
import com.glxp.api.entity.collect.IoCollectOrderBizOrigin; import com.glxp.api.entity.collect.IoCollectOrderBizOrigin;
import com.glxp.api.entity.collect.IoCollectOrderOrigin; import com.glxp.api.entity.collect.IoCollectOrderOrigin;
import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.exception.JsonException; import com.glxp.api.exception.JsonException;
import com.glxp.api.http.ErpBasicClient; import com.glxp.api.http.ErpBasicClient;
import com.glxp.api.req.basic.GetSickPrescribeRequest; import com.glxp.api.req.basic.GetSickPrescribeRequest;

Loading…
Cancel
Save