feat: 药品关联关系功能

dev_no_inv
chenhc 9 months ago
parent dcfa320847
commit bfaae7675e

@ -149,6 +149,18 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode
*/
@Transactional(rollbackFor = Exception.class)
public void add(RelCodeBatchRequest relCodeBatchRequest) {
String productCode = relCodeBatchRequest.getProductCode();
String subTypeNo = relCodeBatchRequest.getSubTypeNo();
String batchNo = relCodeBatchRequest.getBatchNo();
//如果不存在就添加
List<RelCodeBatch> list = this.list(new LambdaQueryWrapper<RelCodeBatch>()
.eq(RelCodeBatch::getProductCode, productCode)
.eq(RelCodeBatch::getSubTypeNo, subTypeNo)
.eq(RelCodeBatch::getBatchNo, batchNo))
;
if (CollUtil.isNotEmpty(list)){
throw new JsonException( "层级编码:【"+productCode + "】;类型编码:【" + subTypeNo + "】;批次号:【"+batchNo + "】已存在!");
}
List<RelCodeDetailRequest> detailList = relCodeBatchRequest.getDetailList();
if(CollUtil.isEmpty(detailList)){
throw new JsonException("关联明细不能为空!");

@ -47,7 +47,13 @@ public class SyncHeartService {
try {
if (curTime1 - lastTime1 > timeInterval1) {
Arrays.stream(BasicExportTypeEnum.values()).forEach(i -> {
try {
heartService.pushData(syncDataSetEntity, null, i);
} catch (Exception e) {
log.error(ExceptionUtils.getStackTrace(e));
e.printStackTrace();
}
});
redisUtil.set("SPS_SYNC_UPLOAD_DATA", curTime1);
}

Loading…
Cancel
Save