|
|
|
@ -21,6 +21,7 @@ import com.glxp.api.entity.collect.IoCollectOrder;
|
|
|
|
|
import com.glxp.api.entity.collect.IoCollectOrderBiz;
|
|
|
|
|
import com.glxp.api.entity.collect.IoCollectOrderCodeMan;
|
|
|
|
|
import com.glxp.api.entity.collect.RelCodeDetail;
|
|
|
|
|
import com.glxp.api.entity.inout.IoCodeLostEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.IoCodeTempEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.IoSplitCodeEntity;
|
|
|
|
|
import com.glxp.api.entity.inv.AnncmntProductEntity;
|
|
|
|
@ -38,6 +39,7 @@ import com.glxp.api.service.auth.SysWorkplaceService;
|
|
|
|
|
import com.glxp.api.service.basic.BasicCollectBustypeService;
|
|
|
|
|
import com.glxp.api.service.basic.SysWorkplaceDocumentService;
|
|
|
|
|
import com.glxp.api.service.basic.UdiRelevanceService;
|
|
|
|
|
import com.glxp.api.service.inout.IoCodeLostService;
|
|
|
|
|
import com.glxp.api.service.inout.IoSplitCodeService;
|
|
|
|
|
import com.glxp.api.service.inv.AnncmntProductService;
|
|
|
|
|
import com.glxp.api.service.thrsys.IThrBusTypeOriginService;
|
|
|
|
@ -118,6 +120,8 @@ public class IoCollectOrderCodeManService extends ServiceImpl<IoCollectOrderCode
|
|
|
|
|
InvWarehouseService invWarehouseService;
|
|
|
|
|
@Resource
|
|
|
|
|
SysWorkplacePutRelService workplacePutRelService;
|
|
|
|
|
@Resource
|
|
|
|
|
IoCodeLostService codeLostService;
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public IoCollectOrder prescribeTagCode(AddTagCodeReqeust addTagCodeReqeust) {
|
|
|
|
@ -187,7 +191,7 @@ public class IoCollectOrderCodeManService extends ServiceImpl<IoCollectOrderCode
|
|
|
|
|
throw new JsonException(500, "当前产品已过期!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
IoSplitCodeEntity splitCodeEntity = splitCodeService.findByCode(code);
|
|
|
|
|
IoSplitCodeEntity splitCodeEntity = splitCodeService.findByCode(code, putWorkPlaceCode);
|
|
|
|
|
List<IoCollectOrderBiz> collectOrderBizs = collectOrderBizService.listByBillNo(addTagCodeReqeust.getBillNo());
|
|
|
|
|
//2.校验是否处方单UDI码
|
|
|
|
|
if (IntUtil.value(sysWorkplaceDocumentEntity.getScanType()) == WorkOperType.TYPE_GEN_ORDER) {
|
|
|
|
@ -256,6 +260,13 @@ public class IoCollectOrderCodeManService extends ServiceImpl<IoCollectOrderCode
|
|
|
|
|
collectOrderCodeManRequest.setUdiCode(code);
|
|
|
|
|
collectOrderCodeManRequest.setBusType(sysWorkplaceDocumentEntity.getDocumentTypeCode());
|
|
|
|
|
IoCollectOrderCodeMan collectOrderCodeMan = collectOrderCodeManMapper.exitCode(collectOrderCodeManRequest);
|
|
|
|
|
IoCodeLostEntity codeLostEntity = codeLostService.findByCode(code);
|
|
|
|
|
if (codeLostEntity != null) {
|
|
|
|
|
udiEntity.setBatchNo(codeLostEntity.getBatchNo());
|
|
|
|
|
udiEntity.setProduceDate(codeLostEntity.getProduceDate());
|
|
|
|
|
udiEntity.setExpireDate(codeLostEntity.getExpireDate());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (collectOrderCodeMan != null && StrUtil.isNotEmpty(collectOrderCodeMan.getSerialNo())) {
|
|
|
|
|
throw new JsonException(500, "当前追溯码已被其他单据关联!");
|
|
|
|
|
}
|
|
|
|
|