|
|
|
@ -273,31 +273,31 @@ public class IoOrderDetailResultController extends BaseController {
|
|
|
|
|
List<CptTraceResultResponse> cptTraceResultResponses = new ArrayList<>();
|
|
|
|
|
if (CollUtil.isNotEmpty(cptTraceOrderResponses)) {
|
|
|
|
|
for (CptTraceOrderResponse cptTraceOrderResponse : cptTraceOrderResponses) {
|
|
|
|
|
if (cptTraceOrderResponse.getCorpType() == 1 || cptTraceOrderResponse.getCorpType() == 2) {
|
|
|
|
|
CptTraceResultResponse cptTraceResultResponse = new CptTraceResultResponse();
|
|
|
|
|
cptTraceResultResponse.setBillNo(cptTraceOrderResponse.getBillNo());
|
|
|
|
|
cptTraceResultResponse.setBillDate(DateUtil.formatDate(cptTraceOrderResponse.getCreateTime()));
|
|
|
|
|
cptTraceResultResponse.setBillType(cptTraceOrderResponse.getBillType());
|
|
|
|
|
if (cptTraceOrderResponse.getMainAction().equals(ConstantType.TYPE_OUT)) {
|
|
|
|
|
if (StrUtil.isNotEmpty(cptTraceOrderResponse.getFromInvCode()))
|
|
|
|
|
continue;
|
|
|
|
|
cptTraceResultResponse.setInOutType(2);
|
|
|
|
|
cptTraceResultResponse.setFromCorp(authCompany.getName());
|
|
|
|
|
cptTraceResultResponse.setFromCorpCreditNum(authCompany.getCreditCode());
|
|
|
|
|
|
|
|
|
|
CptTraceResultResponse cptTraceResultResponse = new CptTraceResultResponse();
|
|
|
|
|
cptTraceResultResponse.setBillNo(cptTraceOrderResponse.getBillNo());
|
|
|
|
|
cptTraceResultResponse.setBillDate(DateUtil.formatDate(cptTraceOrderResponse.getCreateTime()));
|
|
|
|
|
cptTraceResultResponse.setBillType(cptTraceOrderResponse.getBillType());
|
|
|
|
|
|
|
|
|
|
if (cptTraceOrderResponse.getMainAction().equals(ConstantType.TYPE_OUT)) {
|
|
|
|
|
if (StrUtil.isNotEmpty(cptTraceOrderResponse.getFromInvCode()))
|
|
|
|
|
continue;
|
|
|
|
|
cptTraceResultResponse.setInOutType(2);
|
|
|
|
|
cptTraceResultResponse.setFromCorp(authCompany.getName());
|
|
|
|
|
cptTraceResultResponse.setFromCorpCreditNum(authCompany.getCreditCode());
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
cptTraceResultResponse.setInOutType(1);
|
|
|
|
|
cptTraceResultResponse.setFromCorp(cptTraceOrderResponse.getFromCorpName());
|
|
|
|
|
cptTraceResultResponse.setFromCorpCreditNum(cptTraceOrderResponse.getCreditNo());
|
|
|
|
|
cptTraceResultResponse.setToCorp(authCompany.getName());
|
|
|
|
|
cptTraceResultResponse.setToCorpCreditNum(authCompany.getCreditCode());
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.isEmpty(cptTraceOrderResponse.getFromCorpName()) && cptTraceOrderResponse.getMainAction().equals(ConstantType.TYPE_OUT)) {
|
|
|
|
|
cptTraceResultResponse.setBillType("使用出库");
|
|
|
|
|
cptTraceResultResponse.setToUserInfo("患者使用出库");
|
|
|
|
|
} else {
|
|
|
|
|
cptTraceResultResponse.setInOutType(1);
|
|
|
|
|
cptTraceResultResponse.setFromCorp(cptTraceOrderResponse.getFromCorpName());
|
|
|
|
|
cptTraceResultResponse.setFromCorpCreditNum(cptTraceOrderResponse.getCreditNo());
|
|
|
|
|
cptTraceResultResponse.setToCorp(authCompany.getName());
|
|
|
|
|
cptTraceResultResponse.setToCorpCreditNum(authCompany.getCreditCode());
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.isEmpty(cptTraceOrderResponse.getFromCorpName()) && cptTraceOrderResponse.getMainAction().equals(ConstantType.TYPE_OUT)) {
|
|
|
|
|
cptTraceResultResponse.setBillType("使用出库");
|
|
|
|
|
cptTraceResultResponse.setToUserInfo("患者使用出库");
|
|
|
|
|
}
|
|
|
|
|
cptTraceResultResponses.add(cptTraceResultResponse);
|
|
|
|
|
}
|
|
|
|
|
cptTraceResultResponses.add(cptTraceResultResponse);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|