|
|
|
@ -712,10 +712,18 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(exitLocalEntity, genDetaiEntity);
|
|
|
|
|
genDetaiEntity.setCount(1);
|
|
|
|
|
genDetaiEntity.setReCount(udiCalCountUtil.getActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
if (bussinessTypeEntity.isUse()) {
|
|
|
|
|
genDetaiEntity.setReCount(udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
} else {
|
|
|
|
|
genDetaiEntity.setReCount(udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
exitLocalEntity.setCount(exitLocalEntity.getMyCount() + 1);
|
|
|
|
|
exitLocalEntity.setReCount(exitLocalEntity.getMyCount() * udiCalCountUtil.getActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
if (bussinessTypeEntity.isUse()) {
|
|
|
|
|
exitLocalEntity.setReCount(IntUtil.value(exitLocalEntity.getMyReCount()) + udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
} else {
|
|
|
|
|
exitLocalEntity.setReCount(IntUtil.value(exitLocalEntity.getMyReCount()) + udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(exitLocalEntity.getSerialNo())) {
|
|
|
|
@ -788,7 +796,11 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
return ResultVOUtils.error(500, bussinessTypeEntity.getName() + "单只允许录入非集采产品!");
|
|
|
|
|
}
|
|
|
|
|
//计算实际数量
|
|
|
|
|
codeEnttity.setReCount(codeEnttity.getMyCount() * udiCalCountUtil.getActCount(udiRelevanceResponse));
|
|
|
|
|
if (bussinessTypeEntity.isUse()) {
|
|
|
|
|
codeEnttity.setReCount(codeEnttity.getMyReCount() + udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
} else {
|
|
|
|
|
codeEnttity.setReCount(codeEnttity.getMyReCount() + udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
}
|
|
|
|
|
} else if (udiRelevanceResponses.size() == 0) {
|
|
|
|
|
if (unitFk == null)
|
|
|
|
|
return ResultVOUtils.error(500, "耗材字典不存在此产品!");
|
|
|
|
@ -1036,10 +1048,19 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(exitLocalEntity, genDetaiEntity);
|
|
|
|
|
genDetaiEntity.setCount(1);
|
|
|
|
|
genDetaiEntity.setReCount(udiCalCountUtil.getActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
if (bussinessTypeEntity.isUse()) {
|
|
|
|
|
genDetaiEntity.setReCount(udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
} else {
|
|
|
|
|
genDetaiEntity.setReCount(udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
exitLocalEntity.setCount(exitLocalEntity.getMyCount() + 1);
|
|
|
|
|
exitLocalEntity.setReCount(exitLocalEntity.getMyCount() * udiCalCountUtil.getActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
|
|
|
|
|
if (bussinessTypeEntity.isUse()) {
|
|
|
|
|
exitLocalEntity.setReCount(exitLocalEntity.getMyReCount() * udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
} else {
|
|
|
|
|
exitLocalEntity.setReCount(exitLocalEntity.getMyReCount() * udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(exitLocalEntity.getSerialNo())) {
|
|
|
|
@ -1114,7 +1135,11 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//计算实际数量
|
|
|
|
|
codeEnttity.setReCount(codeEnttity.getMyCount() * udiCalCountUtil.getActCount(udiRelevanceResponse));
|
|
|
|
|
if (bussinessTypeEntity.isUse()) {
|
|
|
|
|
codeEnttity.setReCount(IntUtil.value(codeEnttity.getMyReCount()) + udiCalCountUtil.getUseActCount(udiRelevanceResponse));
|
|
|
|
|
} else {
|
|
|
|
|
codeEnttity.setReCount(IntUtil.value(codeEnttity.getMyReCount()) + udiCalCountUtil.getCirActCount(udiRelevanceResponse));
|
|
|
|
|
}
|
|
|
|
|
} else if (udiRelevanceResponses.size() == 0) {
|
|
|
|
|
if (unitFk == null)
|
|
|
|
|
return ResultVOUtils.error(500, "药品字典不存在此产品!");
|
|
|
|
@ -1550,7 +1575,13 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IoCodeTempEntity tempEntity = codeTempService.selectById(codeTempEntity.getId());
|
|
|
|
|
codeTempEntity.setReCount(codeTempEntity.getMyCount() * udiCalCountUtil.getActCount(codeTempEntity.getNameCode()));
|
|
|
|
|
List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceService.selectGroupByNameCode(codeTempEntity.getNameCode(), null);
|
|
|
|
|
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(codeTempEntity.getAction());
|
|
|
|
|
if (bussinessTypeEntity.isUse()) {
|
|
|
|
|
codeTempEntity.setReCount(codeTempEntity.getMyCount() * udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
} else {
|
|
|
|
|
codeTempEntity.setReCount(codeTempEntity.getMyCount() * udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
}
|
|
|
|
|
int count = tempEntity.getCount() - codeTempEntity.getCount();
|
|
|
|
|
|
|
|
|
|
//更新扫码详情
|
|
|
|
@ -1559,7 +1590,12 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
//扫码数量-1
|
|
|
|
|
int orderCount = orderDetailCodeEntity.getCount();
|
|
|
|
|
orderDetailCodeEntity.setCount(orderCount - count);
|
|
|
|
|
int reCount = count * udiCalCountUtil.getActCount(codeTempEntity.getNameCode());
|
|
|
|
|
int reCount = 0;
|
|
|
|
|
if (bussinessTypeEntity.isUse()) {
|
|
|
|
|
reCount = count * udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0));
|
|
|
|
|
} else {
|
|
|
|
|
reCount = count * udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0));
|
|
|
|
|
}
|
|
|
|
|
orderDetailCodeEntity.setReCount(IntUtil.value(orderDetailCodeEntity.getReCount()) - reCount);
|
|
|
|
|
ioOrderDetailCodeService.update(orderDetailCodeEntity);
|
|
|
|
|
}
|
|
|
|
|