|
|
|
@ -12,10 +12,12 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.dao.inout.IoCodeTempDao;
|
|
|
|
|
import com.glxp.api.entity.auth.AuthAdmin;
|
|
|
|
|
import com.glxp.api.entity.basic.ProductInfoEntity;
|
|
|
|
|
import com.glxp.api.entity.basic.UdiEntity;
|
|
|
|
|
import com.glxp.api.entity.collect.RelCodeDetail;
|
|
|
|
|
import com.glxp.api.entity.inout.IoCodeTempEntity;
|
|
|
|
|
import com.glxp.api.entity.thrsys.ThrSystemEntity;
|
|
|
|
|
import com.glxp.api.exception.JsonException;
|
|
|
|
|
import com.glxp.api.http.sync.SpsDirectClient;
|
|
|
|
@ -345,5 +347,31 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
IoCodeTempDao ioCodeTempDao;
|
|
|
|
|
|
|
|
|
|
public void threadUpdateIoCodeTempEntity(IoCodeTempEntity codeTempEntity){
|
|
|
|
|
String parentCode = codeTempEntity.getCode();
|
|
|
|
|
List<IoCodeTempEntity> ioCodeTempEntities = ioCodeTempDao.selectList(new LambdaQueryWrapper<IoCodeTempEntity>().eq(IoCodeTempEntity::getCode, parentCode));
|
|
|
|
|
if (CollUtil.isNotEmpty(ioCodeTempEntities)){
|
|
|
|
|
if (this.batchExist(parentCode)){
|
|
|
|
|
//打上匹配到了药品关联关系的标记
|
|
|
|
|
for (int i = 0; i < ioCodeTempEntities.size(); i++) {
|
|
|
|
|
IoCodeTempEntity ioCodeTempEntity = ioCodeTempEntities.get(i);
|
|
|
|
|
ioCodeTempEntity.setDrugLink(1);
|
|
|
|
|
ioCodeTempDao.updateById(ioCodeTempEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
//打上匹配不到了药品关联关系的标记
|
|
|
|
|
for (int i = 0; i < ioCodeTempEntities.size(); i++) {
|
|
|
|
|
IoCodeTempEntity ioCodeTempEntity = ioCodeTempEntities.get(i);
|
|
|
|
|
ioCodeTempEntity.setDrugLink(0);
|
|
|
|
|
ioCodeTempDao.updateById(ioCodeTempEntity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|